@arcgis/map-components
Version:
ArcGIS Map Components
52 lines (51 loc) • 2.56 kB
TypeScript
/// <reference types="@arcgis/core/interfaces.d.ts" />
import { AnalysisViewModel } from '../../support/AnalysisViewModel';
import { default as SceneView } from '@arcgis/core/views/SceneView';
import { default as SliceAnalysis } from '@arcgis/core/analysis/SliceAnalysis.js';
import { default as Layer } from '@arcgis/core/layers/Layer';
import { default as Collection } from '@arcgis/core/core/Collection.js';
import { default as SliceAnalysisView3D } from '@arcgis/core/views/3d/analysis/SliceAnalysisView3D';
export type SliceableLayer = __esri.BuildingComponentSublayer | Layer;
export type LayersMode = "exclude" | "none";
declare class SliceViewModel extends AnalysisViewModel<SceneView, SliceAnalysis> {
private _excludingLayers?;
pickLayerToExclude(): Promise<void>;
place(options?: {
signal?: AbortSignal;
}): Promise<void>;
protected clearAnalysis(): void;
protected initialize(): void;
destroy(): void;
get state(): "disabled" | "excludingLayer" | "ready" | "sliced" | "slicing";
/**
* The shape used to slice elements in a 3D scene.
* Currently the only supported shape is a plane.
*/
get shape(): __esri.SlicePlane | nullish;
set shape(value: __esri.SlicePlane | nullish);
/**
* Enable tilting the slice shape. If set to true, the slice shape will orient itself as best as
* possible to the surface under the cursor when first placing the shape. If set to false, the slice shape is
* restricted to be either horizontal or vertical.
*/
get tiltEnabled(): boolean;
set tiltEnabled(enabled: boolean);
/**
* Add layers to this collection to exclude them from the slice. Layers that
* are draped on the ground surface are not affected by this property
*/
get excludedLayers(): Collection<SliceableLayer>;
set excludedLayers(value: Collection<SliceableLayer> | SliceableLayer[]);
/**
* Indicates whether the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html Ground} and layers that
* are draped on the ground surface are excluded from the slice.
*/
get excludeGroundSurface(): boolean;
set excludeGroundSurface(value: boolean);
protected readonly supportedViewType = "3d";
protected readonly unsupportedErrorMessage = "SliceViewModel is only supported in 3D views.";
start(): Promise<void>;
protected onConnectToAnalysisView(analysisView: SliceAnalysisView3D): void;
protected constructAnalysis(): SliceAnalysis;
}
export default SliceViewModel;