How to build an offline app

1. Select a type of offline app

There are two types of offline apps you can build with :

  1. are suitable if you will have periods of disconnectivity and connectivity or if you want to use online services in the offline app.
  2. are suitable if you will be disconnected at all times or if your data is too large and impractical to transfer over the network.

2. Prepare a mobile data source

provide your with the data and maps that it needs to function. Examples of mobile data sources are , , , and . Different types of offline apps have different options for mobile data sources. You can choose from various mobile data sources that suit your type of .

Partially offline apps support a wider selection of mobile data sources. This type of offline app has network access to download data, such as to generate or to generate .

Fully offline apps have more limited options for mobile data sources. These apps rely primarily on locally stored data, such as authored in ArcGIS Pro or then sideloaded onto the device.

Refer to the chart below to prepare the correct for your offline app.

You can build a using , , , or . See the chart below to determine which fits your app requirements best.

Offline mapsOffline dataMobile packagesData files
2D maps11
3D scenes22
Edit data while offline3
Synchronize offline edits4
Fully disconnected apps/devices44
Offline geocoding5
Offline routing6
Offline analysis
Set expiration date for data access
Full supportPartial supportNo support
  • 1. Map constructed in code
  • 2. Scene constructed in code
  • 3. Shapefiles, GeoPackages, and KML
  • 4. Custom sideloading workflows required
  • 5. Locator exported from ArcGIS Pro
  • 6. Network Analysis dataset exported from ArcGIS Pro

The general steps to prepare a mobile data source are:

  1. Select a type of for your offline app.
  2. Prepare the data using such as , , or the .
  3. For data hosted in the portal, such as a web map or a feature service, enable it for offline use in the .
  4. Obtain the item ID to download the data to your device, or export the data to sideload it onto your device.

3. Build the app

After preparing a mobile data source, the next step is to create an application with ArcGIS Maps SDKs for Native Apps for your preferred platform. Your application will access the mobile data source you have prepared, and can then be expanded with additional functionalities, such as geocoding or routing.

The following examples show how to access different in and .

You can use in a partially offline app only.

ArcGIS Maps SDK for .NETArcGIS Maps SDK for .NETArcGIS Maps SDK for KotlinArcGIS Maps SDK for SwiftArcGIS Maps SDK for JavaArcGIS Maps SDK for Qt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var portal = await ArcGISPortal.CreateAsync();
var portalItem = await PortalItem.CreateAsync(portal, "YOUR_ITEM_ID"); // Replace with your web map ID
var map = new Map(portalItem);

OfflineMapTask offlineTask = await OfflineMapTask.CreateAsync(map);

GenerateOfflineMapParameters generateParameters =
    await offlineTask.CreateDefaultGenerateOfflineMapParametersAsync(areaOfInterest);

GenerateOfflineMapJob job = offlineTask.GenerateOfflineMap(generateParameters, "path\\to\\map\\directory");

GenerateOfflineMapResult result = await job.GetResultAsync();

if (result.OfflineMap is Map offlineMap)
{
    MainMapView.Map = offlineMap;
}

Tutorials

Create an offline-enabled web map

Use Map Viewer and the ArcGIS portal to create an offline-enabled web map.


Create an offline map area

Use your portal to create an offline map area from an offline-enabled web map.


Create a mobile map package

Use ArcGIS Pro to create a mobile map package.


Workflows

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close