map.disableClickRecenter(); map.disableDoubleClickZoom();
Thanks Jian for the reply.I had already tried to implment what you are suggesting that but that click event was getting fired randomly.I did not have much control on it.Anyways, I created my own control by giving calls to the Geometry service.It is not as fine as Measurement Widget, but I have full control on it and it does what I asks it to do.:)Thanks.
measurement.setTool("location",false); measurement.setTool("area",false); measurement.setTool("distance",false);
measure.clearResult(); if(measure.activeTool){ measure.setTool(measure.activeTool, false); }
//Measure button click handler. function MeasureBtnClickHandler() { doIdentify = false; if (dijit.byId('dFloatingPane02').open==false) { createMeasure(); this.navToolbar.deactivate(); //I am calling this method as you mentioned } } ...<snip>... Just calling navToolbar.deactivate() was doing nothing.So, I am calling disable methods on map (as mentioned in my earlier post).
//Measure button click handler. function MeasureBtnClickHandler() { doIdentify = false; if (dijit.byId('dFloatingPane02').open==false) { createMeasure(); this.navToolbar.deactivate(); //I am calling this method as you mentioned } } ...<snip>...
measurement = new esri.dijit.Measurement({ map: map }, dojo.create('measure'));
//Measure button click handler. function MeasureBtnClickHandler() { doIdentify = false; if (dijit.byId('dFloatingPane02').open==false) { createMeasure(); this.navToolbar.deactivate(); //I am calling this method as you mentioned } } //CreateMeasure function function createMeasure() { measurement = new esri.dijit.Measurement({ map: map }, dojo.create('measure')); dojo.place(measurement.domNode,dojo.byId('measurementDiv')); measurement.startup(); dijit.byId('dFloatingPane02').show(); dijit.byId('dijit_DialogUnderlay_0').hide(); }
function tglMeasurementOff() { measurement.destroy(); dijit.byId('dFloatingPane02').hide(); //map.enableMapNavigation()(); }
//When any navigation tool is clicked, following method is called. function DeactivateMeasure() { measurement.setTool("location",false); measurement.setTool("area",false); measurement.setTool("distance",false); }
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.