It would be helpful to have the option for grouped layers to be expanded by default within the Experience Builder Map Layers Widget. Ideally, it would help to select which grouped layers are expanded and which are compressed by default. However, even just having the ability to expand all grouped layers by default would make it easier for users to locate the layer they want to view.
Agree, this should be added - thank you!
@Brian_McLeer I tried your suggested code in version 1.16, but when I enable the legend it also expands that. I just want to enable the expansion of the layer list only, but still force a click on the legend to expand that. Any ideas?
@LindseyStone, this worked for me 1.15 DE but not 1.16 DE. I had to update the code, but there is loss of functionality in the Map Layers widget I am currently using.
I can give you the code that shows the group layers expanded by default and will expand/collapse group layers when you check the tick box on or off. However, with the lack of functionality of other functions it may take away more than it provides for you.
If Esri would allow to expand group layers by default and collapse/expand when a tick box is checked that would resolve most of my map layers widget issues.
Replying as another user who would like to see this functionality added. Thank you!
This looks to be added in the February 2025 AGOL EB update.
This has been supported in the Map Layers widget since the recent Feb 2025 AGOL release, for both modes:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.