DirectLineMeasurement3DViewModel

AMD: require(["esri/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel"], (DirectLineMeasurement3DViewModel) => { /* code goes here */ });
ESM: import DirectLineMeasurement3DViewModel from "@arcgis/core/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel";
Class: esri/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel
Inheritance: DirectLineMeasurement3DViewModel Accessor
Since: ArcGIS API for JavaScript 4.7

Provides the logic for the DirectLineMeasurement3D widget.

See also:

Constructors

new DirectLineMeasurement3DViewModel(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Show inherited properties Hide inherited properties
Name Type Summary Class
Stringmore details

The name of the class.

more detailsAccessor
Objectmore details

The current measurement calculated between the two points.

more detailsDirectLineMeasurement3DViewModel
Stringmore details

The view model's state.

more detailsDirectLineMeasurement3DViewModel
SystemOrLengthUnitmore details

Unit system (imperial, metric) or specific unit used for displaying the distance values.

more detailsDirectLineMeasurement3DViewModel
SystemOrLengthUnit[]more details

List of unit systems (imperial, metric) and specific units for displaying the distance values.

more detailsDirectLineMeasurement3DViewModel
SceneViewmore details

The view from which the widget will operate.

more detailsDirectLineMeasurement3DViewModel

Property Details

declaredClass Stringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

measurement Objectreadonly

The current measurement calculated between the two points.

Properties:
measurementMode String

Describes the mode in which the measurement was taken. In euclidean mode, the distances are measured as straight lines in the ECEF coordinate system. In geodesic mode, the distances are measured as geodesic lines on the WGS84 ellipsoid.

Possible Values:"euclidean"|"geodesic"

directDistance MeasurementValue

The direct distance between the two points.

horizontalDistance MeasurementValue

The horizontal distance between the two points.

verticalDistance MeasurementValue

The vertical distance between the two points.

state Stringreadonly

The view model's state.

Value Description
disabled not ready yet
ready ready for measuring
measuring currently measuring
measured measuring has finished

Possible Values:"disabled"|"ready"|"measuring"|"measured"

Default Value:disabled

Unit system (imperial, metric) or specific unit used for displaying the distance values.

unitOptions SystemOrLengthUnit[]

List of unit systems (imperial, metric) and specific units for displaying the distance values.

view SceneView

The view from which the widget will operate.

Method Overview

Name Return Type Summary Class
more details

Clears the current measurement.

more detailsDirectLineMeasurement3DViewModel
more details

Starts a new measurement.

more detailsDirectLineMeasurement3DViewModel

Method Details

clear()
Since: ArcGIS API for JavaScript 4.16

Clears the current measurement.

start()
Since: ArcGIS API for JavaScript 4.16

Starts a new measurement.

Example:
const directLineMeasurement3D = new DirectLineMeasurement3D({
  view: view,
  unit: "kilometers"
});

await directLineMeasurement3D.start();

Type Definitions

MeasurementValue Object

Measurement value.

Properties:
text String

Textual representation of the measured value.

state String

State of the measured value.

Value Description
available measured value is available
unavailable measured value is not available due an incomplete measurement or because the value is not available for the given measurement configuration (e.g. direct distance is unavailable in geodesic mode)

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.