MobileMapPackage

A mobile map package. Mobile map packages allow you to work offline with maps on a mobile device. Each mobile map package can encapsulate one or more map definitions, including their basemap layers, data layers, layer content, layer styles and pop-up definitions. Each mobile map package contains an Item with metadata about the package, such as the description and thumbnail.

You can create a mobile map package using either:

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 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.

MobileMapPackage implements the com.arcgismaps.Loadable interface. Once it is loaded, you can access its content and perform the following:

Since

200.1.0

Constructors

Link copied to clipboard
constructor(path: String)

Create a MobileMapPackage with a path. The path can refer to a file with an .mmpk extension or a directory containing an unpacked mobile map package.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Expiration details for this mobile map package, if provided. Expiration details provide:

Link copied to clipboard
val item: Item?

The mobile map package's Item describing metadata about the package. The item includes the metadata about the mobile map package, such as:

Link copied to clipboard

A com.arcgismaps.tasks.geocode.LocatorTask from the mobile map package. Use this task to geocode and reverse-geocode addresses and places. There is only one com.arcgismaps.tasks.geocode.LocatorTask in each mobile map package but it can be used by all maps.

Link copied to clipboard

A collection of ArcGISMap from the MobileMapPackage. To use the maps in a MobileMapPackage, you first need to load the package. If the mobile map package was created with ArcGIS Pro, the maps are presented in the same order in which they were packaged. Mobile map packages created with the com.arcgismaps.tasks.offlinemaptask.OfflineMapTask will only contain one map.

Link copied to clipboard

The path to the mobile map package. The path can refer to a file with an .mmpk extension or a directory containing an unpacked mobile map package.

Link copied to clipboard

The mobile map package's version. The mobile map package version is set when the package is authored in ArcGIS Pro or when it is generated by the com.arcgismaps.tasks.offlinemaptask.OfflineMapTask.

Inherited properties

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard
fun close()

Closes a mobile map package. Closes a mobile map package and frees file locks on the underlying .mmpk file or directory.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.