Hi Vikram,I have implemented similar functionality where in I calculate the measurement progressively while drawing graphics. You will have to combine Map Click and Mouse Move evnt to get the X Y co-ordinates and you can use the geometry service to calculate the Distance as required.Below code for reference:clickedPointsArr = [];
draw_mapOnClick = map.on("click", getmappoints);
totalsegmentlength = 0;
linelenMouseEvt = dojo.connect(map, "onMouseMove", function (evt) {
if (clickedPointsArr.length > 0) {
var distParams = new esri.tasks.DistanceParameters();
distParams.distanceUnit = esri.tasks.GeometryService[dojo.byId("draw_PerimeterUnitDrpDwn").value];
distParams.geometry1 = clickedPointsArr[clickedPointsArr.length - 1];
distParams.geometry2 = mp;
distParams.geodesic = true;
gsvc.distance(distParams, function (distance) {
dojo.byId("draw_AreaTxtBx").value = parseFloat(distance).toFixed(2); //last drawn segment length
lastdrawnsegmentlength = distance;
totalsegmentlength = previousSegmentLength;
totalsegmentlength = totalsegmentlength + lastdrawnsegmentlength;
dojo.byId("draw_PerimeterTxtBx").value = parseFloat(totalsegmentlength).toFixed(2); //total segment length
});
function getmappoints(evt) {
try {
clickedPointsArr.push(evt.mapPoint);
if (clickedPointsArr.length > 1) {
previousSegmentLength = totalsegmentlength; }
} catch (e) {
var err = e;
}
}
Regards,Manish Patel