AnsweredAssumed Answered

Is tracking layer toggle events in Javascript 4.15 possible?

Question asked by jawest1 on May 15, 2020
Latest reply on May 15, 2020 by jawest1

In my application I am adding a webmap where all layers are turned off. I am looking for a way to track the # of layers toggled on and the id/name of the layers. I have not been able to find an event triggered when the layers are toggled on/off. I am doing this because I want to be able to dynamically update the Swipe widget which I could do if I could find the event that fires when the layer is toggled.I also want to limit the number of layers toggled on at some point possibly. I am working in javascript 4.15. Just a note the layer toggle is not linked to the layer added/removed from map events. Also I am using the layerlist idget to toggle the layers on/off visibility.

Outcomes