Skip to content

VolumeMeasurementAnalysisView3D

ESM: import VolumeMeasurementAnalysisView3D from "@arcgis/core/views/3d/analysis/VolumeMeasurementAnalysisView3D.js";
CDN: const VolumeMeasurementAnalysisView3D = await $arcgis.import("@arcgis/core/views/3d/analysis/VolumeMeasurementAnalysisView3D.js");
Class: @arcgis/core/views/3d/analysis/VolumeMeasurementAnalysisView3D
Since: ArcGIS Maps SDK for JavaScript 4.34
beta

Represents the analysis view of a VolumeMeasurementAnalysis after it has been added to SceneView.analyses.

The VolumeMeasurementAnalysisView3D is responsible for rendering a VolumeMeasurementAnalysis using custom visualizations. The properties on the analysis view provide developers with the ability to query measured results. If the result is unavailable, the error property provides the details on the cause.

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 VolumeMeasurementAnalysis();
view.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 volume measurement analysis object associated with the analysis view.

VolumeMeasurementAnalysisView3D

Error encountered while calculating the analysis result.

VolumeMeasurementAnalysisView3D

Enables interactivity for the analysis.

VolumeMeasurementAnalysisView3D

Result of the volume measurement.

VolumeMeasurementAnalysisView3D

The analysis view type.

VolumeMeasurementAnalysisView3D

When true, the analysis is visualized in the view.

VolumeMeasurementAnalysisView3D

Property Details

analysis

Property
analysis VolumeMeasurementAnalysisreadonly

The volume measurement analysis object associated with the analysis view.

error

Property
error VolumeMeasurementError |null |undefined

Error encountered while calculating the analysis result. The error has well defined names that can be used to provide specific error feedback to the user. See VolumeMeasurementError for the list of possible error names.

interactive

Property
interactive Boolean

Enables interactivity for the analysis. When set to true the input geometry can be edited interactively.

Default Value:false

result

Property
result VolumeMeasurementResult |null |undefinedreadonly

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

type

Property
type Stringreadonly

The analysis view type.

For VolumeMeasurementAnalysisView3D the type is always "volume-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 a new polygon for the volume measurement analysis.

VolumeMeasurementAnalysisView3D

Method Details

place

Method
place(options){Promise<VolumeMeasurementPlacementResult>}

Starts the interactive placement of a new polygon for the volume measurement analysis.

If the analysis does not have a geometry yet, the method allows drawing it interactively in the view. Otherwise, clicking in the view will remove the previous geometry and start a new placement operation.

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<VolumeMeasurementPlacementResult> A promise which resolves when the operation is completed successfully or rejected if it is canceled.
Example
// cancel the placement operation at some later point
// by calling abortController.abort()
const abortController = new AbortController();

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

Type Definitions

VolumeMeasurementPlacementResult

Type Definition
VolumeMeasurementPlacementResult

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