Display a map from a mobile map package.
Use case
An .mmpk file is an archive containing the data (specifically, basemaps and features) used to display an offline map.
How to use the sample
When the sample opens, it will automatically display the map in the mobile map package. Pan and zoom to observe the data from the mobile map package.
How it works
- Create a
MobileMapPackage
specifying the path to the .mmpk file. - Load the mobile map package with
mmpk.LoadAsync()
. - After it successfully loads, get the map from the .mmpk and add it to the map view:
mapView.Map = package.Maps.First();
.
Relevant API
- MapView
- MobileMapPackage
About the data
This sample shows points of interest within a Yellowstone Mobile Map Package hosted on ArcGIS Online.
Tags
mmpk, mobile map package, offline
Sample Code
<UserControl
x:Class="ArcGIS.UWP.Samples.OpenMobileMap.OpenMobileMap"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls" >
<esriUI:MapView x:Name="MyMapView" />
</UserControl>