Enable Offline Mode - Tile Layer(hosted)

1916
7
Jump to solution
12-15-2020 11:09 AM
MarkEastwood
Occasional Contributor II

Is there anyway to enable offline mode for a tile layer using the python api? 

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

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

View solution in original post

0 Kudos
7 Replies
by Anonymous User
Not applicable

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

0 Kudos
JérômeGROELL
New Contributor

Hi Calvin,

Does this enhancement possible now ?

I search a way to enabled offline mode on hosted tile layer with python too

 

by Anonymous User
Not applicable

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

0 Kudos
EmmaTeuten
New Contributor

Hi Peter,

Has this enhancement been added yet?

0 Kudos
by Anonymous User
Not applicable

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. 

0 Kudos
MarkEastwood
Occasional Contributor II

@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? 

0 Kudos
MarkEastwood
Occasional Contributor II

@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?