AreaMeasurement3DViewModel
require(["esri/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel"], function(AreaMeasurement3DViewModel) { /* code goes here */ });
esri/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel
Provides the logic for the AreaMeasurement3D widget.
Constructors
- new AreaMeasurement3DViewModel(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 of the area. more details | more details | AreaMeasurement3DViewModel | |
String | The view model's state. more details | more details | AreaMeasurement3DViewModel | |
String | Unit system (imperial, metric) or specific unit used for displaying the area values. more details | more details | AreaMeasurement3DViewModel | |
String[] | List of available units and unit systems (imperial, metric) for displaying the area values. more details | more details | AreaMeasurement3DViewModel | |
SceneView | The view from which the widget will operate. more details | more details | AreaMeasurement3DViewModel |
Property Details
The name of the class. The declared class name is formatted as
esri.folder.className
.
- measurement Objectreadonly
The current measurement of the area.
- Properties:
- measurementMode String
Describes the mode in which the measurement was taken. In
euclidean
mode, the area and perimeter length are computed from a flat polygon with straight segments on the perimeter in the ECEF coordinate system. Ingeodesic
mode, the area and perimeter length are computed from a geodesic polygon on the WGS84 ellipsoid.Possible Values: euclidean | geodesic
area MeasurementValueThe area of the polygon.
perimeterLength MeasurementValueThe perimeter length of the polygon.
- 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 area values.
Possible Values:"metric"|"imperial"|"square-inches"|"square-feet"|"square-us-feet"|"square-yards"|"square-miles"|"square-meters"|"square-kilometers"|"acres"|"ares"|"hectares"
List of available units and unit systems (imperial, metric) for displaying the area values.
Possible Values:"metric"|"imperial"|"square-inches"|"square-feet"|"square-us-feet"|"square-yards"|"square-miles"|"square-meters"|"square-kilometers"|"acres"|"ares"|"hectares"
- 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 | AreaMeasurement3DViewModel | ||
Starts a new measurement. more details | more details | AreaMeasurement3DViewModel |
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 areaMeasurement3DViewModel = new AreaMeasurement3DViewModel({ view: view, unit: "square-meters" }); function measure () { console.log("AreaMeasurement3DViewModel: ", areaMeasurement3DViewModel); areaMeasurement3DViewModel.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 invalid measured value is not available due to an invalid measurement configuration (e.g. self-intersecting polygon)