kwebb24

disable hide deactivate identify infowindow while measuring

Discussion created by kwebb24 on Jun 21, 2012
Latest reply on Nov 8, 2016 by dcoley
I am trying to disable/deactivate/hide my infowindow when I use the standard arcgis javascript api measure widget and have it show when I am not measuring with the following code:


        dojo.connect(map, 'onLayersAddResult', function (result) {

        function disablepopup() {
   map.infoWindow.hide();
   }
  ///Measurement variable
            var measurement = new esri.dijit.Measurement({map: map, onClick: disablepopup}, dojo.byId('measurementDiv'));
        
          measurement.startup();

          <!--DEACTIVATES MEASUREMENT TOOLS AFTER MEASUREMENT--> 
  dojo.connect(measurement, "onMeasureEnd", function(activeTool,geometry){
  this.setTool(activeTool, false), map.infoWindow.hide()
  });

Currently, when I double click to finish measuring the info window hides as it I want it to but up until that point it popups up like normal when I start my measurement and while I am measuring.  Does anyone have a fix for this?
I have already thought and looked into the identify listener and tying the identify to a button but in this particular situation I need it to be disabled only when measuring and do not want the user to have to click an identify button.

Thanks,
Kirk

Outcomes