I am looking to use the ArcGIS API for Python to enable popups for each layer in a webmap.

I found Configure Popup Attributes Programmatically with ArcGIS API for Python on GeoNet which addresses how to disable popups for each layer, but I am looking to do the opposite.

I have also asked Enable Popups for each layer in a webmap Enable Popups for each layer in a webmap using ArcGIS API for Python on GeoNet.


I made a simple web map to test this out. For some reason none of my layers had the 'popupInfo' property mentioned in that geonet post ... but setting the 'disablePopup' property to false on all layers worked for me.

import arcgis
import json

gis = arcgis.gis.GIS("https://arcgis.com", "username", "password")

item = gis.content.get("<item-id>")
item_data = item.get_data()
layers = item_data['operationalLayers']

for layer in layers:

item_properties = {"text": json.dumps(item_data)}

  • Thanks for your answer but unfortunately this does not work. Confirmed with ESRI that is not possible to enable popups with ArcGIS API for Python. There is currently an enhancement in the ArcGIS API for Python to offer this functionality.
    – CLJ
    Jul 14 '20 at 19:13
  • 1
    Glad you got an answer from ESRI!
    – Nick
    Jul 15 '20 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.