AnsweredAssumed Answered

watch for layers being turned on/off (4.3)

Question asked by TRRP on May 28, 2017
Latest reply on May 30, 2017 by TRRP

I need to run a little code everytime a layer is turned on or off.  Users will control layers through a LayerList widget.  I've seen another post on watching layer lists(Watch on LayerList Not Working 4.3 ), but it doesn't seem to cover what I need.  I've also tried map.layers.on("change", function(){ ... }); and about everything else I can think of, but just can't trigger a response when I click a layer on or off.  Thanks for your suggestions!

Outcomes