I am using the NavToolbar example for a zoom tool....I can select the zoom tool and zoom in fine...and then hit the deactivate tool and it deactivates the zoom .But I want the Zoom to deactivate after each usage...I cant put the "navToolbar.deactivate();" in the Zoom function or it will not run... Anyone know how I can accomplish turning off the Zoom function after each usage?Or is there an easier way to do this?<div id="navToolbar" data-dojo-type="dijit/Toolbar"> <div data-dojo-type="dijit/form/Button" id="zoomin" data-dojo-props="iconClass:'zoominIcon'"></div> </div> <div id="navToolbar2" data-dojo-type="dijit/Toolbar"> <div data-dojo-type="dijit/form/Button" id="deactivate" data-dojo-props="iconClass:'deactivateIcon'">Deactivate</div> </div>
var navToolbar = new Navigation(app.map); registry.byId("zoomin").on("click", function () { navToolbar.activate(Navigation.ZOOM_IN); }); registry.byId("deactivate").on("click", function () { //ClearGraphicsZoomTools(); navToolbar.deactivate(); });