i use an HTML snippet to determine tool (in my if statements)Yes i know i should use switch/case instead of ifs(my code actually uses onDblClick, but there is an onClick event for the map object as well).dojo.connect(map, "onClick", dojo.hitch(this, function(evt) {
if(dojo.byId("controllerStatus").innerHTML=="Current Action: Zoom Out"){
this.map.centerAndZoom(this.map.toMap(evt.screenPoint),this.map.getLevel()-1);
}
else if(dojo.byId("controllerStatus").innerHTML=="Current Action: Zoom In"){
this.map.centerAndZoom(this.map.toMap(evt.screenPoint),this.map.getLevel()+1);
}
else if(dojo.byId("controllerStatus").innerHTML=="Current Action: Move Map"){
this.map.centerAt(this.map.toMap(evt.screenPoint));
}else if(dojo.byId("controllerStatus").innerHTML==""||!dojo.byId("controllerStatus").innerHTML){
this.map.centerAndZoom(this.map.toMap(evt.screenPoint),this.map.getLevel()+1);
this.map.centerAt(this.map.toMap(evt.screenPoint));
}
}));