Offline maps and scenes allow your users to continue being productive even when their network connectivity is poor or non-existent. Your apps can explore maps, collect information, edit asset data, find places and route to new locations, all while disconnected from the Internet. You can choose to synchronize your data edits with other users when a connection is re-established.
ArcGIS Runtime SDK for iOS supports a range of workflows to help you take your maps and scenes offline. These workflows fall into two broad categories
- the Services pattern supports a dynamic workflow where multiple users
- are occasionally online so that offline maps and data can be downloaded to the device
- receive regular data updates provided by online services
- can edit and share their updates with other users
- the Desktop pattern supports users who
- are never online or access is very limited
- work with read only data that rarely changes
The services pattern allows you to build apps that can download specific maps, layers and data, on request, to the device. Users can edit their operational data offline and synchronize it with other users when connectivity is restored. Choose a workflow that best matches your business needs:
- Preplanned workflow: A manager authors and generates a map area, ahead of time, so that any field worker can download it to their device and work with it offline.
- On-demand workflow: The field worker defines a map’s area of interest, generates the map content and downloads it to their device.
- Take individual layers offline: Field workers take individual layers offline and use these to construct the base map, operational layers and maps within their app.
The preplanned workflow allows a manager to define a map area and generate the map content so that it can be downloaded by many field workers. 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 individual team members just download the map areas to their devices at the beginning of the week. Team members will be able to work offline to locate the inspection gauges. There are two phases:
The work or crew manager produces each preplanned map area as follows:
- Create a map area by specifying an area of interest for each work/inspection zone .
- Generate the map area content so that it is ready for download.
The crew downloads the work/inspection map areas to their device using your app. The app code must:
- Query the online map to find the map areas.
- Select a map area.
- Download the map area, along with the map content, onto the user's device.
- Display the offline map and allow the user to edit the data, if required.
- Go offline with the map
For step details see take a map offline - preplanned.
On-demand offline workflow
The on-demand offline workflow allows your user 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, 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 define an area of interest.
- Generate the map content for that area of interest.
- Download the map content to the user's device.
- Display the offline map and allow the user to edit the data, if required.
- Go offline with the map.
For step details see take a map offline - on-demand.
Take individual layers offline
You can also build an app that takes individual layers offline using this API. The app can then control how the map is built, which layers to combine and how to render the information. If you require this level of control then see take a layer offline.
ArcGIS Pro allows you to create mobile map and scene packages that can be taken offline. An advantage of this approach is that you can prepare the data once, using ArcGIS Pro, shared it with your ArcGIS organizational account and download or just copy it directly to a device. The desktop pattern is appropriate where the data is fairly static and does not change on a regular basis. This content can include features, tabular data, tile caches, network datasets for directions and locators that can be packaged into a single mobile map or scene package file.
Create an offline map or scene
Use ArcGIS Pro to create mobile map package (.mmpk) or mobile scene package(.mspk) files. 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 copied onto your device you can open it using the AGSMobileMapPackage or AGSMobileScenePackage class. For more details see see take a map offline - ArcGIS Pro and take a scene offline - ArcGIS Pro.
Currently all mobile map and scene packages that are authored by ArcGIS Pro are read-only.
For more information about creating packages in ArcGIS Pro see create a mobile map package or create a mobile scene package. 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.
Enabling data and licensing
To allow people to take a hosted feature layer offline and work with it while disconnected from the network you must enable synchronization on the hosted feature layer. Through the synchronization process, you can control whether a user can upload their edits, download others' edits, or both. Synchronization allows the app to maintain up-to-date data in the offline map. 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 provides a set of tiled basemaps and a set of vector tiled basemaps that can be exported as tiled packages for offline use. These services require an ArcGIS Online organizational subscription or an ArcGIS Developer account and do not consume credits. The licensing details for using these basemaps offline are described in 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.