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