Basemap.withItem constructor

Basemap.withItem(
  1. Item item
)

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

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

Parameters:

Implementation

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