connect.connect(map, 'onClick', function(e){ if (ID_STATE = 'DEFAULT') { // execute =idtask1 } else if (ID_STATE == 'BUTTON_CLICK') { // execute idtask2 } });
var handler1 = on.pausable(map, 'click', function() { // stuff idtask1.execute(/*stuff*/); }); on(button, 'click', function() { // here's the cool part, this event only happens one time var id_handler = on.once(map, 'click', function() { idtask2.execute(params, function() { /** handle results **/ handler1.resume(); // turn the default map click handler back on }); }); });
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.