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

07-31-2021 02:59 PM
Occasional Contributor II

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:



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?





2 Replies
Occasional Contributor II

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

New Contributor

That works! Thanks, @MarkEastwood.

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

0 Kudos