AreaMeasurementAnalysisView3D

ESM: import AreaMeasurementAnalysisView3D from "@arcgis/core/views/3d/analysis/AreaMeasurementAnalysisView3D.js";
CDN: const AreaMeasurementAnalysisView3D = await $arcgis.import("@arcgis/core/views/3d/analysis/AreaMeasurementAnalysisView3D.js");
Class: @arcgis/core/views/3d/analysis/AreaMeasurementAnalysisView3D

Represents the analysis view of an AreaMeasurementAnalysis after it has been added to SceneView.analyses.

The AreaMeasurementAnalysisView3D is responsible for rendering a AreaMeasurementAnalysis using custom visualizations.

It allows to create a new analysis interactively using the place() method, query the measured result, or make an existing analysis editable by enabling the interactive property.

The view for an analysis can be retrieved using SceneView.whenAnalysisView similar to how layer views are retrieved for layers using SceneView.whenLayerView.

// retrieve analysis view for analysis
const analysis = new AreaMeasurementAnalysis();
sceneView.analyses.add(analysis); // add to the scene view
const analysisView = await view.whenAnalysisView(analysis);

Things to consider:

See also

Property Overview

Name Type Summary Class

The area measurement analysis object associated with the analysis view.

AreaMeasurementAnalysisView3D

Enables interactivity for the analysis.

AreaMeasurementAnalysisView3D

Result of the area measurement.

AreaMeasurementAnalysisView3D

The analysis view type.

AreaMeasurementAnalysisView3D

When true, the analysis is visualized in the view.

AreaMeasurementAnalysisView3D

Property Details

analysis

Property
analysis AreaMeasurementAnalysisreadonly

The area measurement analysis object associated with the analysis view.

interactive

Property
interactive Boolean

Enables interactivity for the analysis. When set to true, manipulators will be displayed, allowing users to click and drag to edit the analysis if it has a valid geometry.

This property is automatically set to true when the analysis is assigned to an Area Measurement 3D component.

Default Value:false

Result of the area measurement. Results are calculated asynchronously and should be watched for changes.

type

Property
type Stringreadonly

The analysis view type.

For AreaMeasurementAnalysisView3D the type is always "area-measurement-view-3d".

visible

Property
visible Boolean

When true, the analysis is visualized in the view.

Method Overview

Name Return Type Summary Class

Starts the interactive placement of an area measurement.

AreaMeasurementAnalysisView3D

Method Details

place

Method
place(options){Promise<AreaMeasurementPlacementResult>}

Starts the interactive placement of an area measurement.

If the analysis does not have a geometry yet, the method allows creating one interactively in the view. If the analysis already has a measurement, clicking in the view will remove it and start the placement of a new geometry.

The placement operation will finish when the user presses the escape key. To stop the placing programmatically, pass an abort signal as an argument when calling the method.

Calling this method sets interactive to true.

Parameters
optional

An object specifying additional options.

Specification
optional

Abort signal which can be used to cancel the operation.

Returns
Type Description
Promise<AreaMeasurementPlacementResult> A promise which resolves when the operation is completed successfully or rejected if it is canceled.
Example
const abortController = new AbortController();

try {
  await analysisView.place({ signal: abortController.signal });
} catch (error) {
  if (error.name === "AbortError") {
    console.log("Placement operation was cancelled.");
  }
}

// cancel the placement operation at some later point
abortController.abort();

Type Definitions

AreaMeasurementAnalysisResult

Type Definition
AreaMeasurementAnalysisResult

Result obtained from an AreaMeasurementAnalysis.

Properties

Describes the mode in which the measurement is computed. 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. In geodesic mode, the area and perimeter length are computed from a geodesic polygon on the WGS84 ellipsoid.

Possible Values:"euclidean"|"geodesic"

Area of the polygon.

perimeter Length|null|undefined

Perimeter length of the polygon.

AreaMeasurementPlacementResult

Type Definition
AreaMeasurementPlacementResult

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