AnnotationLayer.withItem constructor
Creates a new annotation layer object from a feature service portal item.
Parameters:
item
— A feature service PortalItem.layerId
— The layer ID for which to create the layer.
Implementation
factory AnnotationLayer.withItem({
required Item item,
required int layerId,
}) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_AnnotationLayer_createWithItem(
item._handle,
layerId,
errorHandler,
);
});
return Layer._instanceCache.instanceWith(handle);
}