@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
75 lines (73 loc) • 12.7 kB
TypeScript
import type FeatureExpressionInfo from "./FeatureExpressionInfo.js";
import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { ElevationUnit } from "../../core/units.js";
import type { ElevationInfoMode } from "./types.js";
import type { FeatureExpressionInfoProperties } from "./FeatureExpressionInfo.js";
export interface ElevationInfoProperties<Modes extends ElevationInfoMode = ElevationInfoMode> extends Partial<Pick<ElevationInfo<Modes>, "offset" | "unit">> {
/** Defines how to override an element's Z-value based on its attributes. */
featureExpressionInfo?: FeatureExpressionInfoProperties | null;
/**
* Defines how the element is placed with respect to the terrain surface or 3D objects in the scene.
* If the geometry consists of multiple points (e.g. lines or polygons), the elevation is evaluated
* separately for each point. See the table below for a list of possible values.
*
* 
*
* Mode | Description
* ------|------------
* on-the-ground | Elements are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/), then elements are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). If elements have z-values, then the z-values are ignored in this mode. Elements with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polyline/), [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) or [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/).
* absolute-height | Elements are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or any other layers into account. This is the default value of elements with any geometry type where `hasZ = true`.
* relative-to-ground | Elements are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). The element's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/) and the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. If the geometries don't have z-values, `relative-to-ground` is the default value for [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/references/core/symbols/IconSymbol3DLayer/).
* relative-to-scene | Elements are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/references/core/symbols/ExtrudeSymbol3DLayer/), [meshes](https://developers.arcgis.com/javascript/latest/references/core/symbols/MeshSymbol3D/), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/), depending on which one has higher elevation. If the element is not directly above a building or any other element, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value.
*/
mode?: ElevationInfoMode;
}
/**
* Specifies how elements like features, observers, targets or flow are placed on the vertical axis (z). This property may only be used
* in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/)
* for an example of how this property may be used.
*
* > [!WARNING]
* >
* > If `elevationInfo` is not set, the elevation mode is picked on the fly for each feature:
* > - Features with z-values default to `absolute-height`.
* > - Features without z-values:
* > - Polylines, polygons, and points drawn with `ObjectSymbol3DLayer` default to `on-the-ground`.
* > - Points drawn with `IconSymbol3DLayer` default to `relative-to-ground`.
* >
* > Feature services do not persist `elevationInfo`, so elevation settings from publishing tools such as ArcGIS Pro are lost unless saved in a web scene.
*
* @since 4.34
*/
export default class ElevationInfo<Modes extends ElevationInfoMode = ElevationInfoMode> extends ElevationInfoSuperclass {
constructor(properties?: ElevationInfoProperties);
/** Defines how to override an element's Z-value based on its attributes. */
get featureExpressionInfo(): FeatureExpressionInfo | null | undefined;
set featureExpressionInfo(value: FeatureExpressionInfoProperties | null | undefined);
/**
* Defines how the element is placed with respect to the terrain surface or 3D objects in the scene.
* If the geometry consists of multiple points (e.g. lines or polygons), the elevation is evaluated
* separately for each point. See the table below for a list of possible values.
*
* 
*
* Mode | Description
* ------|------------
* on-the-ground | Elements are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/), then elements are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). If elements have z-values, then the z-values are ignored in this mode. Elements with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polyline/), [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) or [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/).
* absolute-height | Elements are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or any other layers into account. This is the default value of elements with any geometry type where `hasZ = true`.
* relative-to-ground | Elements are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). The element's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/) and the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. If the geometries don't have z-values, `relative-to-ground` is the default value for [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/references/core/symbols/IconSymbol3DLayer/).
* relative-to-scene | Elements are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/references/core/symbols/ExtrudeSymbol3DLayer/), [meshes](https://developers.arcgis.com/javascript/latest/references/core/symbols/MeshSymbol3D/), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/), depending on which one has higher elevation. If the element is not directly above a building or any other element, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value.
*/
get mode(): Modes;
set mode(value: ElevationInfoMode);
/**
* An elevation offset, which is added to the vertical position of the element. If `unit` is not defined, the offset
* is in `meters`.
* When `mode = "on-the-ground"`, this property has no effect.
*/
accessor offset: number | null | undefined;
/** The unit for `featureExpressionInfo` and `offset` values. */
accessor unit: ElevationUnit | null | undefined;
}
declare const ElevationInfoSuperclass: typeof JSONSupport & typeof ClonableMixin