ArcGISMap.withItem constructor

ArcGISMap.withItem(
  1. Item item
)

Creates a map with a portal item of type PortalItemType.webMap.

The PortalItem automatically loads when the ArcGISMap loads. If the loaded Item is not a portal item of type PortalItemType.webMap, the map fails to load.

Parameters:

Implementation

factory ArcGISMap.withItem(
  Item item,
) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Map_createWithItem(
      item._handle,
      errorHandler,
    );
  });
  return GeoModel._instanceCache.instanceWith(handle);
}