@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
75 lines (73 loc) • 3.54 kB
TypeScript
import type Point from "../geometry/Point.js";
import type { ClonableMixin } from "../core/Clonable.js";
import type { JSONSupport } from "../core/JSONSupport.js";
import type { PointProperties } from "../geometry/Point.js";
export interface SlicePlaneProperties extends Partial<Pick<SlicePlane, "heading" | "height" | "tilt" | "width">> {
/** A point specifying the position of the center of the plane. */
position?: PointProperties | null;
}
/**
* Provides the shape definition of a slice plane for a [Slice component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slice/)
* or [SliceAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/).
* The slice plane is defined by a position, heading and tilt. Its size is defined by width and height.
*
* [](https://developers.arcgis.com/javascript/latest/sample-code/building-scene-layer-slice/)
*
* When working with a [SliceAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/), the plane can be set or retrieved from the
* [SliceAnalysis.shape](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/#shape) property.
*
* ```js
* const sliceAnalysis = new SliceAnalysis({
* shape: new SlicePlane({
* position: new Point({ x: -0.1, y: 51.5 }),
* width: 50,
* height: 50,
* tilt: 45
* }),
* tiltEnabled: true
* });
*
* view.analyses.add(sliceAnalysis);
* ```
*
* @since 4.23
* @see [SliceAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/)
* @see [SliceAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/SliceAnalysisView3D/)
* @see [Slice component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slice/)
* @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
*/
export default class SlicePlane extends SlicePlaneSuperclass {
constructor(properties?: SlicePlaneProperties);
/**
* The heading angle (in degrees) of the slice plane.
*
* @default 0
*/
accessor heading: number;
/**
* The height of the slice plane. The unit is derived from the
* [SpatialReference](https://developers.arcgis.com/javascript/latest/references/core/geometry/SpatialReference/) of the [position](https://developers.arcgis.com/javascript/latest/references/core/analysis/SlicePlane/#position).
*
* @default 10
*/
accessor height: number;
/** A point specifying the position of the center of the plane. */
get position(): Point | null | undefined;
set position(value: PointProperties | null | undefined);
/**
* The tilt angle (in degrees) of the slice plane.
*
* @default 0
*/
accessor tilt: number;
/** The string value representing the type of the slice shape. */
get type(): "plane";
/**
* The width of the slice plane. The unit is derived from the
* [SpatialReference](https://developers.arcgis.com/javascript/latest/references/core/geometry/SpatialReference/) of the [position](https://developers.arcgis.com/javascript/latest/references/core/analysis/SlicePlane/#position).
*
* @default 10
*/
accessor width: number;
}
declare const SlicePlaneSuperclass: typeof JSONSupport & typeof ClonableMixin