Is there anyway to enable offline mode for a tile layer using the python api?
Hi Mark,
I searched through all the properties associated with a vector tile layer in the ArcGIS API for Python, but couldn't find any property that would allow you to turn on the "Offline Mode" setting. For feature layers, you can manage the settings found under the Item Details page of an item through the FeatureCollectionManager class, but this won't work for tile layers.
I think this would make a great enhancement request.
-Calvin
I can as of today Nov.18,2025 the arcgis.mapping.VectorTileLayer solution still works. I could not get it to work using the arcgis.layers.VectorTileLayer method just like BrianKatz reported.I only needed to enable offline use on a set of hosted tile layers and the above code worked with this modification.
Confirmed this solution works. Thanks so much!
Although it works as of today, unfortunately, arcgis.mapping.VectorTileLayer is deprecated so I'm not sure for how long it will continue to work. I tried running the exact same code but using the modern arcgis.layers.VectorTileLayer method instead, and that does NOT work to toggle the offline mode switch for the vector tile layer. I'm not sure why there is a discrepancy there, but Esri would be wise to fix that functionality before completing phasing out arcgis.mapping.VectorTileLayer...
@Anonymous User
I found the following code in the api documentation...
from arcgis.mapping import VectorTileLayer from arcgis.gis import GIS # connect to your GIS and get the tile layer item gis = GIS(url, username, password) vector_layer_item = gis.content.get('abcd_item-id') vector_tile_layer = VectorTileLayer.fromitem(vector_layer_item) vtl_manager = vector_tile_layer.manager vtl_manager.edit_tile_service(min_scale = 50, max_scale = 100, export_tiles_allowed = True, max_export_tile_count = 10000)
It looks like I should be able to toggle the "Offline Mode" switch by setting the export_tiles_allowed argument to True/False. This syntax is working and edits the min_scale, max_scale, and max_export_tile_count.
It is not updating the export_tiles_allowed argument. Any ideas?
Would you be able to point me to the ArcGIS API for Python documentation for enabling "Offline Mode" on a hosted tile layer?
Hi @EmmaTeuten - it looks like it's planned for the next version of the ArcGIS API for Python. Unsure of the exact release date but you should see it in the near future.
Hi Peter,
Has this enhancement been added yet?
The enhancement for this is ENH-000139612 - you can contact support to attach your customer number. Alternatively if you email pklingman@esri.com with your customer number I can also get you attached.
Thanks,
-Peter
Hi Calvin,
Does this enhancement possible now ?
I search a way to enabled offline mode on hosted tile layer with python too
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.