Mobile map packages A mobile map package (MMPK) is a standalone file that contains one or more map definitions, including the basemap layers, data layers, layer styles, and pop-up styles for use in offline applications built with ArcGIS Maps SDKs for Native Apps. Learn more and mobile scene packages A mobile scene package (MSPK) is a standalone file that contains one or more scene definitions, including the basemap layers, elevation layers, data layers, layer styles, and pop-up styles for use in offline applications built with ArcGIS Maps SDKs for Native Apps. Learn more allow you to work offline with maps/scenes on a mobile device. Each package can encapsulate one or more map or scene definitions, including their basemap layers, data layers, layer content, layer styles, and pop-up definitions. Each package contains a description and a thumbnail that describes its contents.

You can download a package from ArcGIS Online or ArcGIS Enterprise directly onto your device. Alternatively, if your app needs to work in a completely offline environment, you can deliver these packages with your app (or sideload Sideloading is the process of deploying a file or package to a device without using a network. Learn more them).

Open a package

To open a mobile map or scene package, first create the appropriate package object (MobileMapPackage or MobileScenePackage) by passing the file path to its constructor. The package file may have been downloaded to the device or included with the app. Load the package to make its contents accessible.

Once it’s loaded, you can read the package contents and perform the following:

  • Access the individual maps (from a map package) or scenes (from a scene package) and display them in a view.
  • Discover whether the package has expired.
  • Programmatically add, remove, or modify layers by setting a display filter, changing the renderer, changing the visibility on layers, and so on (these changes cannot be persisted because mobile map and scene packages are read-only).
  • Geocode using address locator(s) contained within the package.
  • Solve routes using the network dataset(s) contained within the package (map packages only).

Package expiration

The author of a map or scene package can set an expiration for the package. The expiration property specifies a date when the package expires, an expiration message, and an access option for the package after it expires.

There are two access options:

  • Prevent access when expired: The contents of the package cannot be accessed after the expiration date. Such an expiration may be assigned to prevent unauthorized access to the data, perhaps for legal reasons. For example, you may want data provided to third-party contractors to expire at the end of their contract.
  • Allow access when expired: The contents of the package is accessible after the expiration date, but an expiration message will be displayed. This type of expiration might be assigned to a package whose data may be outdated by the expiration date. For example, a package that describes an annual event whose details might change next year.

There are three possible outcomes when you try to load a mobile map package A mobile map package (MMPK) is a standalone file that contains one or more map definitions, including the basemap layers, data layers, layer styles, and pop-up styles for use in offline applications built with ArcGIS Maps SDKs for Native Apps. Learn more or mobile scene package A mobile scene package (MSPK) is a standalone file that contains one or more scene definitions, including the basemap layers, elevation layers, data layers, layer styles, and pop-up styles for use in offline applications built with ArcGIS Maps SDKs for Native Apps. Learn more :

  1. You have full access to the package. This situation occurs if the package has not expired or if it has been created without any expiration properties.
  2. You have full access to the package even though the maps and their data have expired. You will be warned that the package is out of date.
  3. You cannot access the package because it has expired. In this case, the package will fail to load and you will not be able to access its maps and data.

These three outcomes are managed by the package load process. No extra workflow or code paths are required to accommodate this expiration.

If you want to provide your users with extra information, you can retrieve the expiration details from the mobile map package A mobile map package (MMPK) is a standalone file that contains one or more map definitions, including the basemap layers, data layers, layer styles, and pop-up styles for use in offline applications built with ArcGIS Maps SDKs for Native Apps. Learn more or mobile scene package A mobile scene package (MSPK) is a standalone file that contains one or more scene definitions, including the basemap layers, elevation layers, data layers, layer styles, and pop-up styles for use in offline applications built with ArcGIS Maps SDKs for Native Apps. Learn more . For example, you could display the number of days that remain before a package expires using steps like this:

  1. Load the package.
  2. Read the expiration property.
  3. Check if the package has an expiration date.
  4. If it has a date and has not yet expired, get the expiration date.
  5. Calculate the number of days between today and the expiration date. Report the number of days remaining.