Taking a web map offline allows users continued productivity when their network connectivity is poor or nonexistent. For example, by taking a map offline, a field worker inspecting utility lines in remote areas could still access a feature's location and attribute information.
How to use the sample
When the app starts, you will be prompted to sign in using a free ArcGIS Online account. Once the map loads, zoom to the extent you want to take offline. The red border shows the extent that will be downloaded. Click the "Take Map Offline" button to start the offline map job. The progress bar will show the job's progress. When complete, the offline map will replace the online map in the map view.
How it works
Create an Map with a Portal item pointing to the web map.
Create GenerateOfflineMapParameters specifying the download area geometry, minimum scale, and maximum scale.
Create an OfflineMapTask with the map.
Create the OfflineMapJob with OfflineMapTask.GenerateOfflineMap(params, downloadDirectoryPath) and start it with OfflineMapJob.Start().
When the job is done, get the offline map with OfflineMapJob.Result.OfflineMap.
Relevant API
GenerateOfflineMapJob
GenerateOfflineMapParameters
GenerateOfflineMapResult
OfflineMapTask
Portal
About the data
The map used in this sample shows the stormwater network within Naperville, IL, USA, with cartography designed for web and mobile devices with offline support.