Skip To Content

Create Mobile Map Package

Summary

Packages maps and basemaps along with all referenced data sources into a single .mmpk file.

Usage

  • Mobile map packages can be used by ArcGIS Pro, Explorer for ArcGIS, Navigator for ArcGIS, and by developers building applications with ArcGIS Runtime SDK. For ArcGIS Runtime SDK, .mmpk files were introduced at version 100.0.

  • Mobile map packages can be shared with others by uploading them to your organization in ArcGIS Online or by sharing an .mmpk file through common file sharing methods.

  • Mobile map packages support simple features, raster datasets, tables, relationship classes, locators, network datasets, and maps that contain map tile (.tpk) or vector tile (.vtpk) packages. Mobile map packages created in ArcGIS Pro for use in apps created with ArcGIS Runtime SDKs currently only support the following layer types: feature layers, raster layers, raster tiled layers from previously created .tpk files, and vector tiled layers from previously created .vtpk files.

  • If an extent is not specified, the visible extent of the map will be used to define the area of interest (AOI) and consolidate only those features that intersect that extent.

  • When creating a mobile map package, all maps, basemaps, and data layers will be projected to a common coordinate system. The coordinate system that will be used is the coordinate system of the first input map specified.

  • If the map contains a network layer that references a network dataset, it will be included in the mobile map package as a transportation network for routing and driving directions. All feature classes and tables that the network references will become part of the mobile map package. This may include layers that are not part of the map. For example, if there is only a network layer in the map, the package will include the streets, junctions, and turns feature classes associated with the network.

    For a network dataset to support mobile map packaging, there are a few restrictions to keep in mind:

    • The network dataset must be part of a geodatabase. This excludes networks that are in SDC or shapefile format.
    • The network dataset must be from ArcGIS 10.0 or later. If the network is from an earlier version, upgrade the geodatabase and network.
    • The network dataset cannot have an unknown coordinate system.
    • The network dataset cannot use any VB or Python script evaluators.
    • The network dataset cannot use any custom COM evaluators.
    • A network dataset that uses live traffic will be packaged, but the live traffic components will not be used since they are not supported.

Syntax

CreateMobileMapPackage_management (in_map, output_file, {in_locator}, {area_of_interest}, {extent}, {clip_features}, {title}, {summary}, {description}, {tags}, {credits}, {use_limitations}, {anonymous_use})
ParameterExplanationData Type
in_map
[in_map,...]

One or more maps or basemaps that will be packaged into a single .mmpk file.

Map
output_file

The output mobile map package (.mmpk).

File
in_locator
[in_locator,...]
(Optional)

One or more locators (.loc) to include in the mobile map package.

Note:
Locators have the following restrictions:
  • The locator must be created with ArcGIS 10.0 or later.
  • The locator cannot have an unknown coordinate system.
  • The locator or any participating locator in a composite locator cannot be a geocoding service, including services from ArcGIS Enterprise or ArcGIS Online.
  • The locator cannot contain a custom plug-in in the locator style configuration.
Address Locator
area_of_interest
(Optional)

Polygon layer that defines the area of interest. Only those features that intersect the area_of_interest will be included in the mobile map package.

Feature Layer
extent
(Optional)

The extent that will be used to select the features that will be included in the mobile map package. You can specify the extent using a keyword or by entering the coordinates using the format X-Min Y-Min X-Max Y-Max. To use the extent of a specific layer, specify the layer name.

  • MAXOF—Union of inputs
  • MINOF—Intersection of inputs
  • DISPLAY—Same extent as current display
  • <Layer>—Same extent as specified layer

If an area_of_interest is specified, the extent parameter is ignored.

Extent
clip_features
(Optional)

Determines if the output features will be clipped to the given area of interest or extent.

  • CLIPThe geometry of the features will be clipped to the given area_of_interest or extent.
  • SELECT Features in the map will be selected and their geometry will remain unaltered. This is the default.
Boolean
title
(Optional)

Adds title information to the properties of the package.

String
summary
(Optional)

Adds summary information to the properties of the package.

String
description
(Optional)

Adds description information to the properties of the package.

String
tags
(Optional)

Adds tag information to the properties of the package. Multiple tags can be added or separated by a comma or semicolon.

String
credits
(Optional)

Adds credit information to the properties of the package.

String
use_limitations
(Optional)

Adds use limitations to the properties of the package.

String
anonymous_use
(Optional)

Available with the Publisher Extension, determines if the mobile maps can be used by anyone.

  • ANONYMOUS_USEEnables anyone with access to the package to use the mobile map without signing in with an Esri Named User account.
  • STANDARDAnyone with access to the package must be signed in with a Named User account to use the mobile map. This is the default.
Boolean

Code sample

CreateMobileMapPackage example 1 (Python window)

Python sample for CreateMobileMapPackage that packages multiple maps and basemaps from within a project.

import arcpy
arcpy.management.CreateMobileMapPackage(["Basemap1", "Basemap2", "Map1"], 
                                        r"d:\temp\MobileMapPackage1.mmpk", 
                                        r"d:\data\MyLocators\AddressLocator.loc", 
                                        None, "DEFAULT", "SELECT", "Title", 
                                        "Summary", "description", "Tag", 
                                        "Credit information", "Usage_Limitations")
CreateMobileMapPackage example 2 (stand-alone Python)

Python sample for running CreateMobileMapPackage using an area of interest to clip features.

import arcpy

outputfile = "d:/Data/Output/sandiego.mmpk"
arcpy.management.CreateMobileMapPackage([r"C:\data\Basemap1.mapx", r"C:\data\Map1.mapx"], 
                                        outputfile, None, r"\\share\layers\AreaOfInterest.lyrx", 
                                        "DEFAULT", "CLIP", "Title", "Summary", "description", "Tag")

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics