Hi, I have a listner for event "onclick". Implementation of that listner zooms map to a certain point and renders graphics on it. No again on click of that zoomed in graphics,i want an other onclick event lisetner. Since the existing onclick event listner is already active, it zooms in again. I want to disconnect the existing onclick lisetner and have a new listener inside it. dojo.discoonect(abc) is not working, since the abc is nt accessible due to out of scope. Is there any common thing which disconnects all event listeners?
var handler = dojo.connect(map, "onClick", function () { dojo.disconnect(handler); //stuff });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.