Select to view content in your preferred language

Hiding the eyeball icon (visibility toggle) for just one of the GroupLayers in a LayerList

391
2
08-12-2024 01:38 PM
andrewc213
Emerging Contributor

andrewc213_0-1723494869091.png

Is it possible to hide just one of the eyeball icons in a LayerList? For example, the Base layer GroupLayer object's visibilityMode attribute is set to "exclusive", meaning exactly one child layer will always be active, but I want to take it one step further and ensure that the sole active child Base layer is always visible. To do that, I want to get rid of the eyeball icon that the screenshot shows. But I want to hide only that eyeball icon, and not the eyeball icon of "Reference layers". Is this possible?

 

0 Kudos
2 Replies
Sage_Wall
Esri Regular Contributor

I don't know of any way to remove the eyeball from the single layer but you could remove that layer from the list with Layer.listMode set to hide.  This would remove the entire Reference layers group layer from the list but it would still be on the map.

0 Kudos
andrewc213
Emerging Contributor

Hmm, okay. Then I'll just leave the LayerList as is. I need to keep the Reference layers GroupLayer in the LayerList, but I think, for my situation, it's fine the way it is, then.

0 Kudos