TileCache+Local database vs AGSGenerateOfflineMap

456
1
06-03-2019 07:39 AM
SteveMiller4
New Contributor II

I've been looking through the sample code and Esri videos trying to figure out the best approach, and I've come across two approaches that might be equivalent but I'm not sure. At ArcGIS Enterprise: Best Practices for Layers and Service Types - YouTube they describe exactly what I want, however they use separate layer services and I'm currently using a single map containing multiple layers. This is similar to the iOS Data Collection sample code (Data Collection for iOS | ArcGIS for Developers ), but they use AGSGenerateOfflineMap. Does AGSGenerateOfflineMap automatically do what is described in the video, as far as using a local Tile Cache and a Geodatabase, if the map contains a Vector Tile layer and a Feature layer, or will I need to do additional work to get the local caching described in the video?

0 Kudos
1 Reply
Nicholas-Furness
Esri Regular Contributor

Hi.

Yes, that's correct. Behind the scenes, AGSGenerateOfflineMapJob will do the work you previously had to do manually in collecting the various layers together and setting a map up to use them.

You can still use the old method if you like, but the GenerateOfflineMapJob is much simpler and takes care of a lot of the hard work. Generally you can use this unless you have very specific needs for taking your data offline, in which case you can lean on the older per-service based approach. See this video from the 2019 DevSummit for more details: ArcGIS Runtime: Working with Maps Online and Offline 

Note that there's also the Preplanned workflow which may be suitable, depending on your use cases. It's also discussed in the above video. Both AGSGenerateOfflineMapJob and AGSDownloadPreplannedOfflineMapJob are created using the AGSOfflineMapTask).

Hope this helps,

Nick.

0 Kudos