AnsweredAssumed Answered

extent-change Listener?

Question asked by jamesfreddyc Champion on Apr 14, 2017
Latest reply on Apr 14, 2017 by jamesfreddyc

Is there a way to implement a listener in a widget.js for extent-change events occurring in the map?


I need to be able to toggle the visibility of a feature layer (that is added by other events from the widget) based upon the map's extent.  The offending workflow is that:


1. Button on a widget panel is deactivated until a specific map extent (zoomed in) is achieved.

2. Upon button click, add the feature layer and set it visible.


The problem with this is that there is no listener in the event that the user zooms out.  I need to be able to toggle off the visibility of that feature layer if the map extent exceeds a certain value. 


Thanks for any input!