Measure distances between two points in 3D.
The distance measurement analysis allows you to add to your app the same interactive measuring experience found in ArcGIS Pro, City Engine, and the ArcGIS API for JavaScript. You can set the unit system of measurement (metric or imperial).
Click 'Change units' to choose a unit system for the measurement. Click any location to update the measurement.
- Create an
AnalysisOverlay
object and add it to the analysis overlay collection of theSceneView
object. - Specify the start location and end location to create a
LocationDistanceMeasurement
object. Initially, the start and end locations can be the same point. - Add the location distance measurement analysis to the analysis overlay.
- The
MeasurementChanged
event will be raised if the distances change. You can get the new values for theDirectDistance
,HorizontalDistance
, andVerticalDistance
from the event arguments.
- AnalysisOverlay
- LocationDistanceMeasurement
- LocationDistanceMeasurement.MeasurementChanged
The LocationDistanceMeasurement
analysis only performs planar distance calculations. This may not be appropriate for large distances where the Earth's curvature must be considered.
3D, analysis