I am having trouble trying to implement caching of map tiles to be used if the user doesn't have a network connection.
I have read through this sample code and attempted to implement it:
But there are a couple of problems I have encountered:
- The map seems to be caching a large area of the map and I would like to only download a small area around the devices current location.
- Where would I get the correct tile URL. At the moment I am using the sample url http://sampleserver6.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer
- How would I retrieve the level of detail the map is currently at? So that I can add it to the ExportTileCacheParameters.
Ideally the functionality I am looking for is the arcgis map to maintain its own internal cache automatically. I could specify the maximum size of the cache and the arcgis map automatically caches map sections that have been downloaded, keeping sections in the cache that have been most recently viewed.
Does arcgis support this notion or do I need to manage a map cache manually such the sample code above? if so, how would you recommend going about this?