The SDK does not currently support working in offline mode. For all practical purposes, network connectivity is required to work with GIS services. The map control does try to make efficient use of the network, but it relies on having access to the GIS services at any given point.However, this is very valuable feedback and we will take it into consideration going forward.Are there any special circumstances under which your application may need to work in a disconnected environment, or is just due to unavailable/choppy network connection? _Divesh
It is concievable that you can write your own custom layer that uses a local cache. You would be responsible for getting the cache on the device, and then implementing the logic to retrieve a particular tile taking into consideration the cache's tiling scheme. Doable, but can be trickyWe haven't thoroughly exercised the workflow of creating custom tiled layers at this time. But you can try subclassing the AGSTiledLayer if you're feeling adventurous, . Here's how it would work (in theory) :Sub-classes must provide implementation for the spatialReference , fullEnvelope , initialEnvelope, and units properties declared by AGSLayer, and the tileInfo property declared by AGSTiledLayer. They must also provide implementation for the tileForLevel:row:column: and tileForLevelAsync:row:column: methods and notify the tileDelegate when appropriate. It is also the responsibility of sub-classes to update the loaded property and notify the delegate when appropriate.
Hi, Thank you for this information. I've been trying to subclass the AGSTiledLayer, but after adding it to the mapview, the tileForLevel:row:column: and tileForLevelAsync:row:column: methods are never called. Do you know if there is anything special to do in the init: method or anywhere else ? It seems I've implemented all the properties needed.Best regards,
HI ... Just wondering if you ever manage to create your own custom tiled layer as per this thread? If so are you able to post the code. Thanks!
Take a look at the OfflineTiledLayer sample and the OnlineOfflineFeatureLayer sample.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.