Description

(Added at v2.3)

The Measurement widget provides tools for calculating the current location (Get Location) and measuring distance (Measure Distance) and area (Measure Area). If the map's coordinate system is not Web Mercator or geographic or if complex polygons are drawn the measure widget will need to use the geometry service to project or simplify geometries. Use esri.config.defaults to specify the geometry service for your application.

It is recommended that you create a geometry service for use within your applications. View the Geometry Services help topic in the Server Resource Center for details on creating and publishing a geometry service. Esri hosts a geometry service on sampleserver6 to support samples published in the Resource Center. You are welcome to use this service for development and testing purposes.

Flag for showing full list of units in the Location tool. When set to true you also need to specify a geometry service for use by the application. This geometry service needs to support the toGeocoordinateString and fromGeoCoordinateString operations which were added at ArcGIS Server version 10.3. Default is false. Added at version 3.10.

If the toolName is location then the values will be an Array containing the location values, and if the toolName is distance or area then the values will be a number containing the length of the measurement in the units currently being used by the Measurement widget. As of v3.11.