OfflineMapTask.withPortalItem constructor

OfflineMapTask.withPortalItem(
  1. PortalItem portalItem
)

Creates the offline map task with the provided portal item. The portal item must represent a web map.

The PortalItem must be of type PortalItemType.webMap, either on ArcGIS Online or an on-premise ArcGIS Enterprise Portal.

Parameters:

  • portalItem — A PortalItem specifying a web map to take offline.

Implementation

factory OfflineMapTask.withPortalItem(PortalItem portalItem) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_OfflineMapTask_createWithPortalItem(
        portalItem._handle, errorHandler);
  });
  return OfflineMapTask._withHandle(handle);
}