AnsweredAssumed Answered

Deactivate measurements when closing panel

Question asked by JohnDenis on Aug 15, 2017
Latest reply on Aug 15, 2017 by JohnDenis

I found this script on GeoNet where all the buttons and measurements created in the Measurement Widget are automatically closed when closing the Measurement panel. 

 

I am trying to duplicate this behaviour on a Calcite theme JSBin but the widget is still active when closing it's panel:

var titlePane = dijit.byId("panelMeasure");
titlePane.on("hide", function(){
  measurement.setTool("location",false);
  measurement.setTool("area",false);
  measurement.setTool("distance",false);
  app.map.graphics.clear();
})

Am I missing something in these code lines?

 

John

 

Outcomes