I need to download an offline map. No Swift documentation in drop downs here: https://developers.arcgis.com/documentation/mapping-apis-and-services/offline/offline-data/
From what I can tell there are three ways to get an offline map.
Just wanted to give some feedback. Kinda confusing when trying to choose the best option. My 100.x code base uses the offline data method with completion blocks. So far I've coded a solution for this method that I think will work using async throws methods. It's my weekend so I'll have to resume on Monday.
Solved! Go to Solution.
Hi @DuanePfeiffer ,
Thanks for the feedback. This has always been a bit of complex topic and we're always keen to improve how we cover it.
This documentation might help a bit. In particular, this diagram:
Working offline essentially breaks down to two main approaches:
Using a map can involve taking a web map offline from your app using the on-demand or pre-planned workflow, or by publishing a Mobile Map Package from ArcGIS Pro and opening that in your app.
Using data can be done by downloading data from services (feature data, image tiled data, or vector tiled data), or by using local data files like mobile geodatabases, geopackages, shapefiles, KML files, etc.
The documentation I link to above goes into more detail on those two approaches, and how you might pick one over another or combine them. Each has pros and cons. Some support editing, some don't, for example, some are more scalable for large workforces, while other provide more flexibility.
Unfortunately we haven't had time yet to get Swift SDK code snippets in place in the doc. But the patterns are the same as for the 100.x Runtime SDK for iOS, so that should help.
There are also topics in the Swift documentation itself: https://developers.arcgis.com/swift/offline-maps-scenes-and-data/
While that's also missing some code snippets for the time being, the patterns you can find here should help you out. For example: https://developers.arcgis.com/ios/offline-maps-scenes-and-data/download-an-offline-map-on-demand/
Hi @DuanePfeiffer ,
Thanks for the feedback. This has always been a bit of complex topic and we're always keen to improve how we cover it.
This documentation might help a bit. In particular, this diagram:
Working offline essentially breaks down to two main approaches:
Using a map can involve taking a web map offline from your app using the on-demand or pre-planned workflow, or by publishing a Mobile Map Package from ArcGIS Pro and opening that in your app.
Using data can be done by downloading data from services (feature data, image tiled data, or vector tiled data), or by using local data files like mobile geodatabases, geopackages, shapefiles, KML files, etc.
The documentation I link to above goes into more detail on those two approaches, and how you might pick one over another or combine them. Each has pros and cons. Some support editing, some don't, for example, some are more scalable for large workforces, while other provide more flexibility.
Unfortunately we haven't had time yet to get Swift SDK code snippets in place in the doc. But the patterns are the same as for the 100.x Runtime SDK for iOS, so that should help.
There are also topics in the Swift documentation itself: https://developers.arcgis.com/swift/offline-maps-scenes-and-data/
While that's also missing some code snippets for the time being, the patterns you can find here should help you out. For example: https://developers.arcgis.com/ios/offline-maps-scenes-and-data/download-an-offline-map-on-demand/
And to clarify, whatever you did in 100.x will work in the 200.x Swift SDK (same patterns, for the most part you just drop the AGS from the class name). You'll just be using Swift Concurrency instead of callback blocks. You can see this example for some details too: https://developers.arcgis.com/swift/sample-code/generate-offline-map/