Layer List: hiding layers and only view one at a time

244
2
03-27-2024 07:54 AM
Labels (1)
lwilcock1
New Contributor

I am trying to make a web app that, hopefully, is intuitive use. Is there a way to not list all layers in the layer list?

Here is my layer list:

lwilcock1_0-1711551204977.png

 

 

I don’t want anyone to see the “popups” layer. Or, at least not be able to toggle it on and off.

The other question about layers: Is there a way to set it up so one layer can be on at a time? Or a different tool that would work for this?

People need to know how to click on and off a layer to only see one data set, and I have noticed that hasn’t been intuitive for everyone!

Thank you for any help!

Tags (2)
0 Kudos
2 Replies
ChelseaRozek
MVP Regular Contributor

In your webmap, you can click the 3 dot menu next to a layer>hit Group>then on the 3 dot menu for that group>Show Properties>scroll down that panel that appeared on the right>toggle on Exclusive Visibility (only show one layer at a time). This will turn the group's sublayers into having a radio button so only one can be on at a time.

As for hiding certain layers from the layer list, it's not built in natively to hide certain layers, but depending on your final application, you could make buttons that only have the functionality of turning certain layers on. Like in Experience Builder. But this would be best if your layer list remains small and it won't dynamically update if you add in more layers. Do you know which app builder you wanted to use?

0 Kudos
RussRoberts
Esri Notable Contributor

Check out setting up a group layer and using exclusive visibility. This will be supported in other 4.x apps like instant apps or experience builder for example.

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/a-hug-for-group-layers-show-only-one...

0 Kudos