UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

96 lines (93 loc) 4.96 kB
import type Color from "../../Color.js"; import type Graphic from "../../Graphic.js"; import type Ground from "../../Ground.js"; import type ElevationProfileLine from "./ElevationProfileLine.js"; import type Layer from "../../layers/Layer.js"; import type BuildingSublayer from "../../layers/buildingSublayers/BuildingSublayer.js"; import type SubtypeSublayer from "../../layers/support/SubtypeSublayer.js"; import type { ElevationProfileLineProperties } from "./ElevationProfileLine.js"; import type { ColorLike } from "../../Color.js"; export interface ElevationProfileLineSceneProperties extends ElevationProfileLineProperties, Partial<Pick<ElevationProfileLineScene, "exclude" | "include">> { /** * Color of the line on the chart and in the view. * * @default "#cf4ccf" */ color?: ColorLike; } /** * Represents a profile line that samples elevation directly from the [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). * * All volumetric objects in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) contribute to the resulting profile, including * [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/), [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/), * [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/), and [FeatureLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) with * volumetric 3D symbols (e.g., [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/), * [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/PathSymbol3DLayer/)). * * The profile line is updated automatically to reflect what is currently loaded and visible in the view, including * changes to the [Camera](https://developers.arcgis.com/javascript/latest/references/core/Camera/) or scene contents. * * > [!WARNING] * > * > **Known Limitations** * > * > - This profile line type is only supported in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) and not in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/). * > - Point cloud scene layers are not supported due to performance considerations. * * @since 4.34 * @example * // Create an elevation profile analysis with a scene profile line * const analysis = new ElevationProfileAnalysis({ * profiles: [{ * type: "scene", * exclude: [view.map.ground], // Exclude ground from elevation sampling * }], * }); */ export default class ElevationProfileLineScene extends ElevationProfileLine { constructor(properties?: ElevationProfileLineSceneProperties); /** * Color of the line on the chart and in the view. * * @default "#cf4ccf" */ get color(): Color; set color(value: ColorLike); /** * 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 * }], * }); */ accessor exclude: 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], * }], * }); */ accessor include: IntersectItem[] | null | undefined; /** The line type. */ readonly type: "scene"; } /** * A layer or graphic to be used in [SceneView.toMap()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#toMap) and [SceneView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#hitTest) filter options. * * @see [SceneView.toMap()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#toMap) * @see [SceneView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#hitTest) */ export type IntersectItem = Graphic | Layer | BuildingSublayer | SubtypeSublayer | Ground;