OfflineMapTask class final

A task used to take a map offline.

Taking a map offline involves downloading an online map and its data, including all the supported layers, tables, renderers, web map configuration etc. so that it can be used offline without a network connection. There are two workflows available for taking maps offline:

  • The ahead-of-time workflow (also sometimes referred to as the preplanned workflow)
  • The on-demand workflow

Ahead-of-time workflow. In this workflow the author of a web map defines geographical areas (offline map areas) to take offline. ArcGIS Online, or ArcGIS Enterprise, uses these to prepare offline map content that is stored online. Download the offline map content to a device using the DownloadPreplannedOfflineMapJob. Note that this API refers to an offline map area as a PreplannedMapArea. For more information about authoring offline map areas, see Take web maps offline.

On-demand workflow. Here the app passes a specific area of interest to a GenerateOfflineMapJob to generate and download the map content to the device. Using this workflow, you can choose to keep online only services (e.g. those that require a network connection) in your offline map. Be aware that an offline map which uses online only services will require a network connection and may require authentication.

Implemented types
Mixed in types

Constructors

OfflineMapTask.withOnlineMap(ArcGISMap onlineMap)
Create the offline map task for the provided online map. The online map must represent a web map.
factory
OfflineMapTask.withPortalItem(PortalItem portalItem)
Creates the offline map task with the provided portal item. The portal item must represent a web map.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
loadError ArcGISException?
The load error.
no setterinherited
loadStatus LoadStatus
The load status.
no setterinherited
onlineMap ArcGISMap?
The online map to be taken offline.
no setter
onLoadStatusChanged Stream<LoadStatus>
A stream that reports changes to the LoadStatus.
no setterinherited
portalItem PortalItem?
The portal item that specifies the map to be taken offline.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelLoad() → void
Cancels loading metadata for the object.
inherited
createDefaultDownloadPreplannedOfflineMapParameters(PreplannedMapArea preplannedMapArea) Future<DownloadPreplannedOfflineMapParameters>
Returns a Future of DownloadPreplannedOfflineMapParameters created from the specified PreplannedMapArea.
createDefaultGenerateOfflineMapParameters({required Geometry areaOfInterest, double minScale = 0.0, double maxScale = 0.0}) Future<GenerateOfflineMapParameters>
Returns a Future of GenerateOfflineMapParameters created from the specified area of interest, min scale and max scale.
createGenerateOfflineMapParameterOverrides({required GenerateOfflineMapParameters parameters}) Future<GenerateOfflineMapParameterOverrides>
Returns a Future of GenerateOfflineMapParameterOverrides created from the specified GenerateOfflineMapParameters parameters.
downloadPreplannedOfflineMapWithParameters({required DownloadPreplannedOfflineMapParameters parameters, required Uri downloadDirectoryUri}) DownloadPreplannedOfflineMapJob
Returns a job that is used to download the preplanned map area specified by the given parameters object.
generateOfflineMap({required GenerateOfflineMapParameters parameters, required Uri downloadDirectoryUri, GenerateOfflineMapParameterOverrides? overrides}) GenerateOfflineMapJob
Returns a job that is used to generate an offline map using the specified parameters and overrides.
getOfflineMapCapabilities({required GenerateOfflineMapParameters parameters}) Future<OfflineMapCapabilities>
Returns an async Future which, when successful, returns the OfflineMapCapabilities containing information on which layers will be included in an offline map.
getPreplannedMapAreas() Future<List<PreplannedMapArea>>
Returns an async Future which when successful, contains a list of preplanned map areas, if there are any.
load() Future<void>
Loads the metadata for the object asynchronously.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retryLoad() Future<void>
Loads or retries loading metadata for the object asynchronously.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited