laptop and a wrench

Bug

Using the Measurement widget with the Draw widget calculates incorrect measurement as the last segment is missed in the calculation.

Last Published: November 7, 2017 ArcGIS API for JavaScript
Bug ID Number BUG-000108386
SubmittedSeptember 28, 2017
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found3.21
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusNon-Reproducible

Additional Information

instead please replace with this code snippet, this is the suggested way. aspect.before(measurement, "setTool", function(method) { // always deactivate draw when switching tools - even if turning measurement tool off // this also prevents draw from destroying necessary map event listeners that the measurement widget relies on draw.deactivate(); }); aspect.after(measurement, "setTool", function(method) { // re-activate draw if theres no active measure tool after setTool logic completes if (!measurement.activeTool) { draw.activate(Draw.LINE); } });

Steps to Reproduce

Bug ID: BUG-000108386

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options