How to change web map "Offline Mode" and "Offline: Advanced Options"?

383
2
07-31-2021 02:59 PM
GB_MattPanunto_GISS
Occasional Contributor

I'm looking to replicate a web map's switch for "Enable offline mode" via ArcGIS Python API, but am not having much luck figuring out how. All I can find are options for managing actual offline areas, which I do not want to do. Seems like this should be a simple option:

GB_MattPanunto_GISS_0-1627768735191.png

 

Additionally, I'm also wanting to change the "Offline: Advanced Options". I found this documentation, but it doesn't seem to be working for me. When I submit a dictionary key and value, as shown below, all I get is "TypeError: 'dict' object is not callable". Am I doing something wrong?

webmap_obj.offline_areas.offline_properties({"download":"features"})

 

GB_MattPanunto_GISS_1-1627768774529.png

 

2 Replies
MarkEastwood
Occasional Contributor

@GB_MattPanunto_GISS were you able to figure out how to switch the "Offline Mode" on/off? I was having the same issue recently, any time I updated my webmaps using the python api, the "Offline Mode" would automatically switch to off. 

I was able to preserve the original web map configuration using the following update syntax...

web_map_obj.update({'typeKeywords': ",".join(wm_item.typeKeywords)})

 

I was also able to manually set the setting with a similar update syntax...

web_map_obj.update({'typeKeywords':'ArcGIS Online, CollectorDisabled, Data Editing, Explorer Web Map, Map, Offline, Online Map, useOnly, Web Map'})

 

The important part for the "Offline Mode" toggle is to have "Offline" in the typeKeywords.

vpelleritoCritigen
New Contributor

That works! Thanks, @MarkEastwood.

For clarity, the update method used is for the arcgis.mapping.Webmap module.

0 Kudos