var actionType; //global vaiablefunction init(){ ... dojo.connect(map, "onclick", clickAction); ...}function identifyBtn_click(){ actionType ="identify"; ...}function measureBtn_click(){ actionType ="measure"; ...}function clickAction(evt){ switch (actionType) { case "identify": ...put identify logic here... break; case "measure": ...put measure logic here... break; .... }}
Simon,Did you ever figure out the proper code structure?I'm running into the same issue with drawing a polygon to do a query task.Every click on the does a new identify as well as draws the polygon...thanks
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.