import ElevationProfileLineScene from "@arcgis/core/analysis/ElevationProfile/ElevationProfileLineScene.js";const ElevationProfileLineScene = await $arcgis.import("@arcgis/core/analysis/ElevationProfile/ElevationProfileLineScene.js");- Inheritance:
- ElevationProfileLineScene→
ElevationProfileLine→ Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.34
Represents a profile line that samples elevation directly from the SceneView.
All volumetric objects in a SceneView contribute to the resulting profile, including Ground, SceneLayer, IntegratedMeshLayer, IntegratedMesh3DTilesLayer, and FeatureLayers with volumetric 3D symbols (e.g., ObjectSymbol3DLayer, PathSymbol3DLayer).
The profile line is updated automatically to reflect what is currently loaded and visible in the view, including changes to the Camera or scene contents.
Example
// Create an elevation profile analysis with a scene profile lineconst analysis = new ElevationProfileAnalysis({ profiles: [{ type: "scene", exclude: [view.map.ground], // Exclude ground from elevation sampling }],});Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
chartOptions inherited | ||
| | ||
declaredClass readonly inherited | ||
enabled inherited | ||
IntersectItem[] | null | undefined | | |
id inherited | ||
IntersectItem[] | null | undefined | | |
title inherited | ||
type readonly | "scene" | |
viewOptions inherited |
chartOptions
Options for visualizing the profile line in a chart.
enabled
- Type
- boolean
Indicates whether the line should be computed and displayed in the chart and view.
- Default value
- true
exclude
- Type
- IntersectItem[] | null | undefined
Items which are to be excluded when querying elevation from the view. When specified, these items will not contribute to the resulting profile. When not specified, all layers (including ground) will be taken into account.
Example
const analysis = new ElevationProfileAnalysis({ profiles: [{ type: "scene", exclude: [view.map.ground], // Exclude ground from elevation sampling for this profile line }],}); id
- Type
- string
Unique identifier for the profile line. This value is automatically generated unless specified.
include
- Type
- IntersectItem[] | null | undefined
Items which are to be included when querying elevation from the view. When specified, only these items will contribute to the resulting profile. When not specified, all layers (including ground) will be taken into account.
Example
const analysis = new ElevationProfileAnalysis({ profiles: [{ type: "scene",
// Only graphics from myGraphicsLayer will be used for elevation sampling of this profile line include: [myGraphicsLayer], }],}); title
Title of the line, shown in the chart tooltip and legend.
viewOptions
Options for visualizing the profile line in the view.
Methods
| Method | Signature | Class |
|---|---|---|
clone inherited | clone(): this |
clone
- Signature
-
clone (): this
Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.
- Returns
- this
A deep clone of the class instance that invoked this method.
Type definitions
IntersectItem
A layer or graphic to be used in SceneView.toMap() and SceneView.hitTest() filter options.
- Type
- Graphic | Layer | BuildingSublayer | SubtypeSublayer | Ground