ArcGISMapImageLayer.withItem constructor

ArcGISMapImageLayer.withItem(
  1. Item item
)

Creates an ArcGIS map image layer from a PortalItem representing an ArcGIS map service.

The item's type should be PortalItemType.mapService.

Parameters:

Implementation

factory ArcGISMapImageLayer.withItem(
  Item item,
) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ArcGISMapImageLayer_createWithItem(
      item._handle,
      errorHandler,
    );
  });
  return Layer._instanceCache.instanceWith(handle);
}