I created a legend for features on the map in arcgis javascript 4.10. The issue I have is that I can only disable a sublayer's visibility by disabling all the layers within the parent layer on the layerlist.
I was wondering is there a way to just disable the visibility of a sublayer without disabling all the sublayers when displaying the legend on a layerlist.
Solved! Go to Solution.
you can set visibilityMode in the GroupLayer to "exclusive" so only one child layer is visible at a time, then you should be able to select which layers are visible.
you can set visibilityMode in the GroupLayer to "exclusive" so only one child layer is visible at a time, then you should be able to select which layers are visible.
Thanks for the response. I tried what you suggested and it works. Thanks a lot.