Skip To Content ArcGIS for Developers Sign In Dashboard

Open an offline map

You can open any map stored in any mobile map package, that was created by any of the following workflows:

If you created the mobile map package with ArcGIS Pro, you may need to consider whether the mobile map package content has expired. If not, proceed to open the offline map.

Handle expired mobile map packages

Using ArcGIS Pro 2.4 (or later), you can control the lifetime of your maps by setting an expiration date on your mobile map package. This will allow you to do the following:

  • Provide data to third-party contractors that will expire at the end of a contract.
  • Indicate to your users that the data has become obsolete.
When you use the ArcGIS Pro tool to create the mobile map package, you can set an expiration date and time, an expiration message, and access options if the package has expired.


These mobile map package expiration properties are available if ArcGIS Pro is licensed with the ArcGIS Publisher extension.

As an ArcGIS Runtime developer, there are three possible outcomes when you try to load a mobile map package:

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

These three outcomes are managed by the mobile map package load process MobileMapPackage.LoadAsync(). 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 Expiration property on the MobileMapPackage. For example, you can display how many days remain before the mobile map package expires. To do this, perform the following steps:

  1. Load the mobile map package.
  2. Read the expiration property on the mobile map package.
  3. Confirm that the mobile map package has not expired.
  4. Get the expiration date.
  5. Calculate the number of days between today and the expiration date. Report the number of days remaining.

// Get expiration details from the package.
Expiration expirationDetails = mobileMapPackage.Expiration;

// Create a string builder to report expiration status to the user.
System.Text.StringBuilder messageBuilder = new System.Text.StringBuilder();

// See if the package is past the expiration date.
if (expirationDetails.IsExpired)
    messageBuilder.AppendLine("The mobile map package has expired:");

    // See if the package can still be used despite expiration.
    switch (expirationDetails.Type)
        case ExpirationType.AllowExpiredAccess:
            messageBuilder.AppendLine("You can continue to use this package.");
            messageBuilder.AppendLine("Consider obtaining a current, updated version.");
        case ExpirationType.PreventExpiredAccess:
            messageBuilder.AppendLine("This package can no longer be used.");
    // If package has not expired, let the user know how many days remain.
    System.DateTimeOffset expirationDate = expirationDetails.DateTime;
    double daysLeft = expirationDate.Subtract(System.DateTime.Today).TotalDays;
    messageBuilder.AppendLine(string.Format("The package will expire in {0} days.", daysLeft.ToString("F2")));

    // Warn if expiration will prevent the package from being used.
    if(expirationDetails.Type == ExpirationType.PreventExpiredAccess)
        messageBuilder.AppendLine("You will not be able to use this mobile map package after that time.");

Open the offline map

You can open the map directly from a mobile map package file (created by ArcGIS Pro) or from a mobile map package directory (created by the preplanned or on-demand workflows). To create the mobile map package object, pass the mobile map package file path or directory to the MobileMapPackage constructor. Load the mobile map package and access its collection of maps. Passing the map to the map view will initiate loading the map, its layers, and data.

// Create a mobile map package from an unpacked map package folder.
MobileMapPackage offlineMapPackage = await MobileMapPackage.OpenAsync(pathToUnpackedPackage);

// Set the title from the package metadata to the UI
Title.Text = offlineMapPackage.Item.Title;

// Get the map from the package and set it to the MapView
var map = offlineMapPackage.Maps.First();
MyMapView.Map = map;


If the mobile map package was created with ArcGIS Pro 2.6 (or later) it may contain online layers or tables. If so, then your app may need to handle authentication before the layers and tables are loaded.

After loading the map, its metadata is accessible using the Map.Item property. In some situations, you may want to access the metadata from the mobile map package without loading the map itself. You can access this from the MobileMapPackage.Item property.

See Display a map for more details on how to access and display maps stored in mobile map packages.

Next steps

After you have loaded and opened the mobile map package, you can continue to work with the maps and follow these steps:

  1. Display and interact with the maps, layers, and data offline. Explore and edit the feature data, if necessary.
  2. Update an offline map by synchronizing your edits with the online services when connectivity is restored.
  3. Finish using an offline map to unregister any geodatabases and fully release all locks on the mobile map package.