measurement-3d
This bundle adds tools that allow to measure distances and areas in 3D.
To observe the measured values programmatically see the API documentation.
Usage
To make the functions of this bundle available to the user, add one or more of the following tool IDs to a tool set:
Tool ID | Description |
---|---|
lineMeasurement3DToggleTool | Measure direct line distances from one point to another. |
areaMeasurement3DToggleTool | Measure areas. |
The widgets are registered at the component system with the widget roles lineMeasurement3D
and areaMeasurement3D
.
Constraints
- The tools of this bundle are only supported for 3D scene views. The tools are hidden in 2D views automatically. For 2D measurement, see measurement-2d.
- The bundle requires fonts located at
https://static.arcgis.com/fonts
. To change this, you need to implement a custom bundle that changes the fontsUrl parameter of the ArcGIS Maps SDK for JavaScript.
Configuration reference
The following code sample shows the configurable properties and their default values:
"measurement-3d": {
"Config": {
"lineDefaultUnit": "metric",
"lineUnits": ["metric", "imperial", "inches", "feet", "yards", "miles", "nautical-miles", "us-feet", "meters", "kilometers"],
"areaDefaultUnit": "metric",
"areaUnits": ["metric", "imperial", "square-inches", "square-feet", "square-yards", "square-miles", "square-us-feet", "square-meters","square-kilometers", "acres", "ares", "hectares"]
}
}
Property | Type | Description |
---|---|---|
lineDefaultUnit |
String | Defines the default selected unit for line measurement. |
lineUnits |
Array | Defines a list of available units for the user to choose from for line measurement. Allowed values are metric , imperial , inches , feet , yards , miles , nautical-miles , us-feet , meters , kilometers . If metric or imperial is selected, the most suitable unit of this unit system is used automatically. |
areaDefaultUnit |
String | Defines the default selected unit for area measurement. |
areaUnits |
Array | Defines a list of available units for the user to choose from for area measurement. Allowed values are metric , imperial , square-inches , square-feet , square-yards , square-miles , square-us-feet , square-meters ,square-kilometers , acres , ares , hectares . If metric or imperial is selected, the most suitable unit of this unit system is used automatically. |