MobileMapPackage class final

A mobile map package.

Mobile map packages allow you to work with maps on a mobile device. A mobile map package contains all of the files necessary to work with your maps and is stored on a device as either:

  • A single archive file with an .mmpk extension
  • A directory containing an unpacked mobile map package

You can create a mobile map package using either:

A mobile map package can encapsulate one or more maps along with their layers and data. Each package contains an Item with metadata about the package (description, thumbnail, etc.).

Mobile map packages created with ArcGIS Pro can also include transportation networks, locators, and links to online services. You can choose whether to use:

  • A tile package (such as .tpkx or .vtpk) or an online basemap as the GeoModel.basemap
  • A mobile geodatabase (.geodatabase) or an online feature service as one of the GeoModel.operationalLayers. Online services (such as traffic or weather) can provide excellent contextual information for your users. If the mobile map package is going to be used in areas of poor connectivity, however, you must ensure that data critical to your workflow is stored locally on the device.

Mobile map packages implement the Loadable interface; you need to load the MobileMapPackage before you can access its content. Once loaded you can:

  • Determine the version of this package using the MobileMapPackage.version property. This API currently supports mobile map packages up to and including major version 5. If the package is from an unsupported version, it will fail to load.
  • Discover whether the mobile map package has expired using the MobileMapPackage.expiration property
  • Access the individual maps and display them in an ArcGISMapViewController
  • Programmatically add, modify, and remove layers in the map. Mobile map packages, however, are read-only and these changes to maps or layers are not persisted.
Implemented types
Mixed in types

Constructors

MobileMapPackage.withFileUri(Uri fileUri)
Create a MobileMapPackage with a path.
factory

Properties

expiration Expiration?
Expiration details for this mobile map package, if provided.
no setter
fileUri Uri
The path to the mobile map package.
no setter
hashCode int
The hash code for this object.
no setterinherited
item Item?
The mobile map package's Item describing metadata about the package.
no setter
loadError ArcGISException?
The load error.
no setterinherited
loadStatus LoadStatus
The load status.
no setterinherited
locatorTask LocatorTask?
A LocatorTask from the mobile map package.
no setter
maps List<ArcGISMap>
A collection of ArcGISMap from the MobileMapPackage.
no setter
onLoadStatusChanged Stream<LoadStatus>
A stream that reports changes to the LoadStatus.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
The mobile map package's version.
no setter

Methods

cancelLoad() → void
Cancels loading metadata for the object.
inherited
close() → void
Closes a mobile map package.
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

Static Methods

unpack({required Uri mobileMapPackageFileUri, required Uri outputDirectory}) Future<void>
Unpacks a mobile map package file (.mmpk) to an output directory.
unpackCancelable({required Uri mobileMapPackageFileUri, required Uri outputDirectory}) CancelableOperation<void>
Cancelable version of unpack. See that method for more information.