Offline maps and scenes allow your users to continue being productive even when their network connectivity is poor or non-existent. Your apps can allow users to explore maps, collect information, edit their assets data, find places and route to new locations, all while disconnected from the Internet. You can also choose to synchronize your data edits with other users when a connection is re-established.
ArcGIS Runtime SDK for macOS supports a range of workflows to help you take your maps and scenes offline. These workflows fall into two broad categories; the Services pattern, best for supporting multiple users who edit and share data, and the Desktop pattern, best for supporting read-only data.
The services pattern allows you to build apps that can download specific maps and layers, on request, to the device. Critically, this pattern allows your users to edit their operational data offline and synchronize it with other users when connectivity is restored. Choose the workflow from the following lists that matches your business needs:
- Author and generate an offline map ahead of time so that your field workers can simply download it and take into the field. See Preplanned workflow.
- Allow users to define a map’s area of interest, generate the offline map content and download it to their device, as required. See On-demand workflow.
- Allow users to take individual layers offline and use these to construct a map within their app. See Take individual layers offline.
The preplanned workflow is appropriate for organizations where the map area is prepared in advance of the field worker entering the field. For example, a gas utility company may have a maintenance crew that inspects pipeline gauges throughout a city. The manager of the crew can prepare a set of map areas prior to the week's work so that the team just downloads the map areas at the beginning of the week. The team members will be able to take the map offline to locate the inspection gauge, explore the surrounding gas network and collect any asset information. They can synchronize their changes back to the company database when connectivity is restored.
The work or crew manager generates each preplanned map areas by following these steps:
- Create a map area for each work/inspection zone by specifying an area of interest.
- Generate the map area content so that it is ready to be downloaded.
The crew downloads the work/inspection map areas to their device using your app. Therefore, the app code must:
- Query the online map to determine which map areas it contains.
- Identify and select a map area.
- Download the map area, along with the map content, onto the user's device.
- Display the offline map and present a UI to allow the user to work with and edit the data.
The app can now go offline with this map. For details of these steps see the take a map offline - preplanned.
On-demand offline workflow
The on-demand offline workflow allows your users to define the exact area of a map they wish to take offline. For example, if a gas leak is identified at an address an emergency crew member can generate a map showing the address and surrounding road network along with the gas network, including pipes, gauges, and so on. They download the map and head out into the field to resolve the problem and collect relevant information.
To download this offline map to the user's device your app needs to:
- Present a UI to allow the user to specify an area of interest.
- Generate the map content using that area of interest.
- Download the map content to the user's device.
- Load and display the offline map.
For details of these steps see the take a map offline - on-demand.
Take individual layers offline
You can also take areas of individual layers offline using this API. This level of control allows you to create a brand new map, combine different layers and present the information pertinent to your business needs. For more details on how to take the different layer types offline, see the take a layer offline.
Data and licensing
For operational data, you can use a sync-enabled feature service from ArcGIS Online or ArcGIS Enterprise to create a mobile geodatabase for offline use. Through the synchronization process, you can control whether a user can upload their edits, download others' edits, or both. This allows the app to maintain an up-to-date view of the data. When more than one user is editing the same feature and the edits conflict, the last edit synchronized to the service overrides the others.
For details on using hosted feature layers, see manage hosted feature layers in the ArcGIS Online help. For details on using ArcGIS Server feature services, see preparing data for offline use and Tutorial: Setting up feature service data for offline use in the ArcGIS Server documentation.
Note:If you need to provide offline routing or geocoding in the app, create the locator and network datasets using the Desktop pattern.
For basemap data, ArcGIS tiled map services, ArcGIS image services and ArcGIS Online basemaps can be downloaded to a user's device in the form of tile packages (.tpk or .vtpk files). This can be from your own ArcGIS Server or a hosted tile layer. For details on enabling export of tiled map services, see Allow clients to export cache tiles in the ArcGIS Server documentation.
Esri offers a set of basemaps that supports offline use. These services require an ArcGIS Online organizational subscription or an ArcGIS Developer account. These services do not consume credits. For licensing details for using basemaps offline, see Use tile packages from ArcGIS Online basemaps.
Apps that use offline mapping require the following license levels:
To view offline basemaps, view and download updates to offline feature data contained in a geodatabase, and work with offline routing and geocoding the app can be licensed at Lite license level.
If offline editing and uploading edits to a sync-enabled feature service are required the app must be licensed at the Basic license level.
Note:See License your app for more information on license levels.
ArcGIS Pro allows you to create mobile map and scene packages or individual data sets that can be taken offline. Any of this read-only data can be shared within your ArcGIS organizational account, downloaded or sideloaded directly to your device. This desktop pattern is appropriate where the data is not changing on a regular basis. This content can include features, tabular data, tile caches, network datasets for directions and locators that can be packaged and distributed individually or combined into a mobile map or scene package.
Create an offline map or scene
You can use ArcGIS Pro to package maps and scenes into a mobile map package (.mmpk) or mobile scene packages (.mspk) files, respectively. Each package can contain multiple maps or scenes, their associated layers and data, and optionally networks and locators. After the mobile package is downloaded or sideloaded onto your device you can open it using the AGSMobileMapPackage or AGSMobileScenePackage class. For more detail on how to work with mobile map packages see open a mobile map package from ArcGIS Pro.
One advantage of this approach is that you can prepare the data using ArcGIS Pro and sideload it onto a device without needing an internet or network connection. You can prepare the data once and deliver it to any number of devices.
Currently all mobile map and scene packages that are authored by ArcGIS Pro are read-only.
For more information see create a mobile map package or create a mobile scene package in the ArcGIS Pro documentation. If you'd like a ready-to-use and regularly updated network dataset (and locator) for your area of interest, you can license StreetMap Premium data (in mobile map package format). For details, see add StreetMap Premium data.
Create offline layers
You can also create individual layer packages directly from ArcGIS for Desktop or ArcGIS Pro. This approach will provide you with more control over when individual packages are generated and you can work with each package separately.
ArcGIS Desktop can also be used for creating runtime content but with limited capabilities. For more information see creating ArcGIS Runtime content in the ArcMap help.
See work with offline layers for more information on working with data such as geodatabases, tile packages, geopackages, and raster datasets.