AnsweredAssumed Answered

Disable Info Window while Measuring

Question asked by elove on Aug 19, 2013
Latest reply on Jan 31, 2017 by mai_quynhnhu
I have an application that utilizes an Identify Task to select and show a popup Info Window on certain layers. This works fine until
the Measurement Widget is activated and an Info Window popups up every time a distance is measured. I have come across many threads that deal with this issue but have had no luck implementing any of them. How do I deactivate the Info Window when
using the Measure Widget? Any help is greatly appreciated!!

//Measurement Tool       var measurement = new esri.dijit.Measurement({              map: map,     defaultLengthUnit: esri.Units.FEET,      }, dojo.byId('measurementDiv'));             measurement.startup();                       dojo.connect(measurement, "onMeasureEnd", function(activeTool,geometry){          this.setTool(activeTool, false),    });  //Identify Event function executeIdentifyTask(evt) {             identifyParams.geometry = evt.mapPoint;         identifyParams.mapExtent = map.extent;         var deferred = identifyTask.execute(identifyParams);          deferred.addCallback(function(response) {              return, function(result) {         var feature = new esri.Graphic(result.feature.toJson());;                        feature.attributes.layerName = result.layerName;         if(result.layerName === 'Section Corners' || result.layerName === 'Accessory Monuments'){          // console.log(feature.attributes.POINT_NAME);          var template = new esri.InfoTemplate("Monuments", "Point Name: ${POINT_NAME}<br/><a target='_blank'  href='${LATITUDE}&LONG=${LONGITUDE}&POINT_NAME=${POINT_NAME}'>Mon. Ref. Sheet</a>");          feature.setInfoTemplate(template);             }             else if (result.layerName === 'Surveys'){             var template = new esri.InfoTemplate("Surveys", "${SURVEYOR}<br/> Survey Number: ${DOCUMENT_N}<br/><a target='_blank' href='${page_id}'>Survey PDF Document</a>");               feature.setInfoTemplate(template);             }                 return feature;           });         });                    map.infoWindow.setFeatures([ deferred ]);;       }