I'm trying to duplicate the "Enable Offline Mode" functionality of a map using the ArcGIS Python API. I see there's an Offline Map Area Manager: https://developers.arcgis.com/python/api-reference/arcgis.mapping.html#offlinemapareamanager but that doesn't seem to have anything about actually setting a map to be offline enabled (I'm actually trying to do the opposite: A map is offline enabled. I want to use the Python API to turn that off).
Thoughts?
There is a Sync capability in ArcGIS Python API, when enabled in a feature layer, you can then create replicas for offline use and sync the updates back to the server to update features.
you also have the option to unregister a replica (sort of disabling offline updates).
The following link provides a guide with some examples about how to use replicas:
https://developers.arcgis.com/python/guide/checking-out-data-from-feature-layers-using-replicas/
I hope that helps.
Mehdi
Nope. Sorry. That's not how I want to handle this. My question was related to updating it within the map (not Feature Layer). In some of my maps, the Feature Layer is for offline use. In other maps, the Feature Layer is for online use. Essentially I want to duplicate the functionality the "Enable Offline mode" toggle performs (see following image) which is associated with a maps settings.
I'm also looking to replicate that switch for "Enable offline mode" via ArcGIS Python API, but am not having much luck figuring out how. Did you ever figure this out? All I can find are options for managing actual offline areas, which I do not want to do.
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 - Were you able to find a way to Enable/Disable the "Enable Offline Mode" parameter using the Python API?
@MarkEastwood No, I haven't, unfortunately.
I posted a possible solution here - https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-change-web-map-quot-offline-mod...