AnsweredAssumed Answered

Capture each segment Measrurement Tool

Question asked by gopre400 on Feb 9, 2016
Latest reply on Feb 10, 2016 by kenbuja

Hi, I saw a few older posts (three years old most recent) but I would like to capture length on each segment while using Measurement tool. I thought using "measure" event would work but that doesn't seem to fire. Can you help?

 

Here is how I am starting and capturing "measure" event...

var measurement;              

$('#liMeasurementOn').click(function () {                  

var divMeasure = ""                  

$('#titlePane').append(divMeasure);                  

$('#titlePane').show();                  

$('#liMeasurementOn').hide();                  

$('#liMeasurementOff').show();                  

dojo.disconnect(connects);                  

measurement = new Measurement({                      

map: map,                      

lineSymbol: measureSymbol,                      

defaultLengthUnit: Units.FEET                     },

dom.byId("measurementDiv"));                  

measurement.startup();                  

measurement.hideTool("location");                  

dojo.connect(measurement,"measure", function() {                      

alert('here');                  

});              

});

 

according to api "measure" is an event of Measurement https://developers.arcgis.com/javascript/jsapi/measurement-amd.html#event-measure

Outcomes