DirectLineMeasurement3DViewModel
require(["esri/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel"], function(DirectLineMeasurement3DViewModel) { /* code goes here */ });
esri/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel
Provides the logic for the DirectLineMeasurement3D widget.
Constructors
- new DirectLineMeasurement3DViewModel(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
Object | The current measurement calculated between the two points. more details | more details | DirectLineMeasurement3DViewModel | |
String | The view model's state. more details | more details | DirectLineMeasurement3DViewModel | |
String | Unit system (imperial, metric) or specific unit used for displaying the distance values. more details | more details | DirectLineMeasurement3DViewModel | |
String[] | List of unit systems (imperial, metric) and specific units for displaying the distance values. more details | more details | DirectLineMeasurement3DViewModel | |
SceneView | The view from which the widget will operate. more details | more details | DirectLineMeasurement3DViewModel |
Property Details
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. Ingeodesic
mode, the distances are measured as geodesic lines on the WGS84 ellipsoid.Possible Values: euclidean | geodesic
directDistance MeasurementValueThe direct distance between the two points.
horizontalDistance MeasurementValueThe horizontal distance between the two points.
verticalDistance MeasurementValueThe 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 String
Unit system (imperial, metric) or specific unit used for displaying the distance values.
Possible Values:"metric"|"imperial"|"inches"|"feet"|"us-feet"|"yards"|"miles"|"nautical-miles"|"meters"|"kilometers"
List of unit systems (imperial, metric) and specific units for displaying the distance values.
Possible Values:"metric"|"imperial"|"inches"|"feet"|"us-feet"|"yards"|"miles"|"nautical-miles"|"meters"|"kilometers"
- view SceneView
The view from which the widget will operate.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
Clears the current measurement. more details | more details | DirectLineMeasurement3DViewModel | ||
Starts a new measurement. more details | more details | DirectLineMeasurement3DViewModel |
Method Details
- clearMeasurement()Since: ArcGIS API for JavaScript 4.10
Clears the current measurement.
- newMeasurement()Since: ArcGIS API for JavaScript 4.10
Starts a new measurement.
Example:const directLineMeasurement3D = new DirectLineMeasurement3D({ view: view, unit: "kilometers" }); function measure () { console.log("DirectLineMeasurement3D: ", directLineMeasurement3D); directLineMeasurement3D.newMeasurement(); } measure();
Type Definitions
- MeasurementValue Object
Measurement value.
- Properties:
- text String
Textual representation of the measured value.
state StringState 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)