Click or drag to resize

MobileMapPackageMaps Property

Gets a collection of Maps from the MobileMapPackage.

Namespace:  Esri.ArcGISRuntime.Mapping
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
public IReadOnlyList<Map> Maps { get; }

Property Value

Type: IReadOnlyListMap

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.

If you display the map by setting the map to a MapView, the map will automatically load. If you only need to access the map's content or metadata, you will need to load it by calling LoadAsync. If the package is not loaded, an empty collection is returned.



Example Name: OpenMobileMap

Display a map from a mobile map package.

Code example screen shot.

// Copyright 2017 Esri.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
// language governing permissions and limitations under the License.

using ArcGISRuntime.Samples.Managers;
using Esri.ArcGISRuntime.Mapping;
using System;
using System.Linq;
using System.Windows;

namespace ArcGISRuntime.WPF.Samples.OpenMobileMap
        name: "Open mobile map package",
        category: "Map",
        description: "Display a map from a mobile map package.",
        instructions: "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.",
        tags: new[] { "mmpk", "mobile map package", "offline" })]
    public partial class OpenMobileMap
        public OpenMobileMap()

        private async void Initialize()
            // Get the path to the mobile map package.
            string filepath = GetMmpkPath();

                // Open the package.
                MobileMapPackage package = await MobileMapPackage.OpenAsync(filepath);

                // Load the package.
                await package.LoadAsync();

                // Show the first map.
                MyMapView.Map = package.Maps.First();
            catch (Exception e)
                MessageBox.Show(e.ToString(), "Error");

        /// <summary>
        /// This abstracts away platform & sample viewer-specific code for accessing local files.
        /// </summary>
        /// <returns>String that is the path to the file on disk.</returns>
        private static string GetMmpkPath()
            return DataManager.GetDataFolder("e1f3a7254cb845b09450f54937c16061", "Yellowstone.mmpk");
    d:DesignHeight="300" d:DesignWidth="300">
    <esri:MapView x:Name="MyMapView" />
See Also
Additional Examples
Hyperlink to ExampleDescription
ApplyScheduledUpdatesApply scheduled updates to a downloaded preplanned map area.
ControlAnnotationSublayerVisibilityUse annotation sublayers to gain finer control of annotation layer subtypes.
DownloadPreplannedMapTake a map offline using a preplanned map area.
HonorMobileMapPackageExpirationAccess the expiration information of an expired mobile map package.
MobileMapSearchAndRouteDisplay maps and use locators to enable search and routing offline using a Mobile Map Package.
OpenMobileMapDisplay a map from a mobile map package.