Mobile Map Package
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:
ArcGIS Pro (from version 1.3). This API version supports any MobileMapPackage up to major version 5. Mobile map packages created with ArcGIS Pro are stored in a file with an .mmpk extension.
Use the OfflineMapTask.generateOfflineMap(GenerateOfflineMapParameters, String) method to generate and download a mobile map package on-demand, or use the OfflineMapTask.createDownloadPreplannedOfflineMapJob(DownloadPreplannedOfflineMapParameters, String) to download a mobile map package already prepared by the map author. Mobile map packages created with the OfflineMapTask are stored in a directory containing an unpacked mobile map package.
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 a MapView
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.
Since
200.1.0
Constructors
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.
Properties
Expiration details for this mobile map package, if provided. Expiration details provide:
A LocatorTask from the mobile map package. Use this task to geocode and reverse-geocode addresses and places. There is only one LocatorTask in each mobile map package but it can be used by all maps.
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 OfflineMapTask will only contain one map.