Class MobileMapPackage
A mobile map package.
Inheritance
Implements
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class MobileMapPackage : ILoadable
Remarks
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.
- A single archive file with a .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 Mobile
Map up to major version 5. Mobile map packages created with ArcGIS Pro are stored in a single file with an .mmpk extension. Data contained in this mobile map package file cannot be edited. For more information, see the Create Mobile Map Package tool in ArcGIS Pro.Package -
Use Generate
Offline to generate and download a mobile map package on-demand, or use DownloadMap(Generate Offline Map Parameters, String) Preplanned to download a mobile map package prepared as an offline map area by the map author (known as the ahead-of time workflow). Mobile map packages downloaded using the OfflineOffline Map(Download Preplanned Offline Map Parameters, String) Map are stored in a directory containing an unpacked mobile map package. You can edit feature data contained in this mobile map package and you can synchronize changes with their online feature services. For more information, explore the on-demand and ahead-of-time workflows offered by the OfflineTask Map .Task
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 Basemap.
-
A mobile geodatabase (.geodatabase) or an online feature service as one of the
Operational
Layers . 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.
- Determine the version of this package using the 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.
- Access the individual maps and display them in a MapView.
- Discover whether the mobile map package has expired using the Expiration property.
- Access the individual maps and display them in a MapView.
-
Programmatically add, remove, or modify layers by setting a display filter, changing the renderer, or
changing the visibility on layers. These changes will not be persisted because mobile map packages are
read-only.
Note: If the mobile map package was created with ArcGIS Pro, you cannot edit its underlying data from feature
tables in a mobile map package. However, if you create a Feature
Collection based on the FeatureTable Query of a FeatureResult Layer in the mobile map package, you can edit the data in the FeatureCollection .Table
Constructors
Name | Description |
---|---|
Mobile |
Initializes a new instance of the Mobile |
Properties
Name | Description |
---|---|
Expiration | Gets the expiration details for this mobile map package, if provided. |
Item | Gets the mobile map package's Item describing metadata about the package. |
Load |
Gets the System. |
Load |
Gets the load status. |
Locator |
Gets the Locator |
Maps | Gets a collection of Maps from the Mobile |
Path | Gets the path to the mobile map package. |
Version | Gets the mobile map package's version. |
Methods
Name | Description |
---|---|
Cancel |
Cancel loading metadata for the object. |
Close() | Closes a mobile map package. |
Load |
Load the metadata for the object asynchronously. |
Open |
Opens a new instance of the Mobile |
Retry |
Loads or retries loading metadata for the object asynchronously. |
Unpack |
Unpacks a mobile map package file (.mmpk) to an output directory. |
Unpack |
Unpacks a mobile map package file (.mmpk) to an output directory. |
Events
Name | Description |
---|---|
Loaded | Event that is raised when the object is done loading. |
Load |
Event that is raised when the Load |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.7 |
.NET | 100.13 - 200.7 |
.NET Windows | 100.13 - 200.7 |
.NET Android | 200.0 - 200.7 |
.NET iOS | 200.0 - 200.7 |
.NET Framework | 100.0 - 200.7 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.7 |