Altering popupInfos in sublayers

09-21-2022 04:03 AM
New Contributor

EDIT: I finally realized I'm not referring to group layers specifically, but rather layers that have sublayers, which is a different thing.

EDIT 2: I ended up finding the solution myself. Layers and sublayers are both items and both have data dicts to apply update on. An extra tier of updating in the code was all that was needed. Consider this one solved.

So I've had the request to be able to automatically alter the PopupTitles to reflect the layer names across a webmap (done through arcpy). This works for regular layers. However, when I get to layers with sublayers I run into trouble. In order to properly alter these particular layers, I have to alter each sublayer's popupInfo but have not been able to.

Now, I can access the popupInfos. Attempting to update the sublayers afterwards however has been impossible as they have been FeatureLayers, which apparently don't have an update funtion to work with. I've tried to get the FeatureLayers as individual items to maybe circumvent the issue, but sublayers don't seem to have item ids to get that to happen.

I know I'm going to be asked for the code. Before I show the code though, I'll have to ask: Is it at all possible to access and update sublayers?

0 Kudos
0 Replies