FeatureLayer.withFeatureLayerItem constructor
- Item item
Creates a new feature layer object from a feature layer or feature service portal item.
If the portal item is a feature service, the FeatureLayer will be created from the first layer on the service.
Parameters:
item
— A feature layer or feature service PortalItem.
Implementation
factory FeatureLayer.withFeatureLayerItem(
Item item,
) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_FeatureLayer_createWithFeatureLayerItem(
item._handle,
errorHandler,
);
});
return Layer._instanceCache.instanceWith(handle);
}