Skip to content

ElevationProfileAnalysisView3D

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

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

The ElevationProfileAnalysisView3D is responsible for rendering an ElevationProfileAnalysis using custom visualizations. The results property contains the computed elevation profile results.

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 ElevationProfileAnalysis();
view.analyses.add(analysis); // add to the view
const analysisView = await view.whenAnalysisView(analysis);
See also

Property Overview

Name Type Summary Class

The elevation profile analysis associated with the analysis view.

ElevationProfileAnalysisView3D

Units used for all the results and statistics of the elevation profile analysis.

ElevationProfileAnalysisView3D

Error encountered while calculating the analysis result.

ElevationProfileAnalysisView3D

Points being hovered in the chart, in the view's spatial reference, computed from the hoveredPosition property.

ElevationProfileAnalysisView3D

Property to track the position, in [0, 1], that is being hovered in the elevation profile chart.

ElevationProfileAnalysisView3D

Enables interactivity for the analysis.

ElevationProfileAnalysisView3D

Combined progress (0 to 1) of generating all configured profiles.

ElevationProfileAnalysisView3D

Results of the elevation profile analysis.

ElevationProfileAnalysisView3D

Combined statistics of all the computed profile lines.

ElevationProfileAnalysisView3D

The analysis view type.

ElevationProfileAnalysisView3D

Whether the analysis is currently being updated.

ElevationProfileAnalysisView3D

When true, the analysis is visualized in the view.

ElevationProfileAnalysisView3D

Property Details

analysis

Property
analysis ElevationProfileAnalysisreadonly

The elevation profile analysis associated with the analysis view.

effectiveDisplayUnits

Property
effectiveDisplayUnits ElevationProfileEffectiveDisplayUnitsreadonly

Units used for all the results and statistics of the elevation profile analysis.

If not specified by user with ElevationProfileAnalysis.displayUnits, the units are chosen automatically based on the magnitude of the results.

error

Property
error ElevationProfileError |null |undefinedreadonly

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 ElevationProfileError for the list of possible error names.

hoveredPoints

Property
hoveredPoints Array<(Point|null|undefined)>readonly

Points being hovered in the chart, in the view's spatial reference, computed from the hoveredPosition property. There is one point for each profile line. When a profile line is not available or no sample exists for the hovered position, the point is undefined.

hoveredPosition

Property
hoveredPosition Number |null |undefined

Property to track the position, in [0, 1], that is being hovered in the elevation profile chart. Can be used to display the corresponding location in the view, see hoveredPoints.

Default Value:null

interactive

Property
interactive Boolean

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

Default Value:false

progress

Property
progress Numberreadonly

Combined progress (0 to 1) of generating all configured profiles.

Example
reactiveUtils.watch(
  () => analysisView.progress,
  (progress) => {
    // Watch the progress and update the chart or UI when needed
  });

results

Property
results ElevationProfileResult[]readonly

Results of the elevation profile analysis. Result objects are created immediately but they are gradually updated as the analysis is computed.

Watch progress to see the state of the calculation.

statistics

Property
statistics Statistics |null |undefinedreadonly

Combined statistics of all the computed profile lines.

type

Property
type Stringreadonly

The analysis view type.

For ElevationProfileAnalysisView3D the type is always "elevation-profile-view-3d".

updating

Property
updating Booleanreadonly

Whether the analysis is currently being updated.

visible

Property
visible Boolean

When true, the analysis is visualized in the view.

Method Overview

Name Return Type Summary Class

Starts an interactive operation to pick a line feature in the view to use as the input for the elevation profile analysis.

ElevationProfileAnalysisView3D

Starts the interactive placement of a new input line for the elevation profile analysis.

ElevationProfileAnalysisView3D

Method Details

pickFeature

Method
pickFeature(options){Promise<ElevationProfilePickResult>}

Starts an interactive operation to pick a line feature in the view to use as the input for the elevation profile analysis.

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

Parameters
optional

An object specifying additional options.

Specification
optional

Abort signal which can be used to cancel the operation.

Returns
Type Description
Promise<ElevationProfilePickResult> A promise which resolves when the operation is completed successfully or rejected if it is canceled.
Example
// Use AbortController to cancel the picking operation at some later point by calling abortController.abort()
const abortController = new AbortController();

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

place

Method
place(options){Promise<ElevationProfilePlacementResult>}

Starts the interactive placement of a new input line for the elevation profile 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 input line 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<ElevationProfilePlacementResult> A promise which resolves when the operation is completed successfully or rejected if it is canceled.
Example
// Use AbortController to 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.");
  }
}

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