Configure map content automatically

09-03-2019 09:35 AM
New Contributor II

Hi, I'm trying to activate popup for a number of layers in a MapImageLayer which is added to a map.

I have read the blogpost Earl Medina's Blog and other relevant treads. The content of the MapImageLayer changes with high frequency and I can not use one static json to update relevant properties due to changes in layer names etc. Allso I suspect that all layerdefinitions will be lost at each update of the service, not showing anything else than the top level items:

{'id': '',
'layerType': 'ArcGISMapServiceLayer',
'url': '',
'visibility': True,
'opacity': 1,
'title': '<name>',
'itemId': '<id>'}
So if I just want to activate the popup and choose one field to display (a field that allways exists), do i have to build the whole json for each grouplayer and layer, based on information from the service (arcgis REST api), to be able to set visible = True under ['popupInfo']['fieldInfos']?


0 Kudos
0 Replies