Is there anyway to enable offline mode for a tile layer using the python api?
Solved! Go to Solution.
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
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
Hi Calvin,
Does this enhancement possible now ?
I search a way to enabled offline mode on hosted tile layer with python too
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 Peter,
Has this enhancement been added yet?
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.
@Anonymous User
Would you be able to point me to the ArcGIS API for Python documentation for enabling "Offline Mode" on a hosted tile layer?
@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?