var handle = dojo.connect(item, 'event', function(){...});
dojo.disconnect(handle);
I may have misinterpreted your issue but I think you might want to use dojo.disconnect to ensure you're only 'listening' to one of those events at a time.(think of it like this:- you want to be in either Identify 'mode' OR Draw 'mode' but not both at the same time i.e. your aim is to make them mutually exclusive)
i have two buttons, name btn1,btn2 btn1 's click function{ dojo.connect(map,"onclick",identify);}btn2 's click function{ dojo.connnect(toolbar,"onDrawEnd",QueryinExtent)}My question is :when i click btn1 first,then click btn2,but the two events all happen!!!!!!when I use toolbar draw event, how to stop the map's onclick event?help help help !!!!!!!1
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.