ArcGISMap.withItem constructor
- 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:
item
— A web map PortalItem.
Implementation
factory ArcGISMap.withItem(
Item item,
) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_Map_createWithItem(
item._handle,
errorHandler,
);
});
return GeoModel._instanceCache.instanceWith(handle);
}