Skip To ContentArcGIS for DevelopersSign In Dashboard

SliceViewModel

require(["esri/widgets/Slice/SliceViewModel"], function(SliceViewModel) { /* code goes here */ });
Class: esri/widgets/Slice/SliceViewModel
Inheritance: SliceViewModel Accessor
Since: ArcGIS API for JavaScript 4.10

Provides the logic for the Slice widget. SliceViewModel provides access to the slice plane and the layers that can be excluded from the slice widget.

See also:

Constructors

new SliceViewModel(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
Collection<(Layer|BuildingComponentSublayer)>

Add layers to this collection to exclude them from the slice.

more details
more detailsSliceViewModel
Boolean

Indicates whether the Ground and layers that are draped on the ground surface are excluded from the slice.

more details
more detailsSliceViewModel
SlicePlane

The shape used to slice elements in a 3D scene.

more details
more detailsSliceViewModel
String

The view model's state.

more details
more detailsSliceViewModel
Boolean

Enable tilting the slice shape.

more details
more detailsSliceViewModel
SceneView

The view from which the widget will operate.

more details
more detailsSliceViewModel

Property Details

declaredClass Stringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

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

excludeGroundSurface Boolean

Indicates whether the Ground and layers that are draped on the ground surface are excluded from the slice.

Default Value:false
Since: ArcGIS API for JavaScript 4.16

The shape used to slice elements in a 3D scene. Currently the only supported shape is a plane.

state Stringreadonly

The view model's state.

ValueDescription
disablednot ready yet
readyready for slicing
slicingcurrently slicing
slicedfinished slicing

Possible Values:"disabled"|"ready"|"slicing"|"sliced"

Default Value:disabled
tiltEnabled Boolean
Since: ArcGIS API for JavaScript 4.16

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.

Default Value:false

The view from which the widget will operate.

Method Overview

NameReturn TypeSummaryClass

Clears the current slice.

more details
more detailsSliceViewModel

Clears the current slice.

more details
more detailsSliceViewModel

Starts a new slice.

more details
more detailsSliceViewModel

Starts a new slice.

more details
more detailsSliceViewModel

Method Details

clear()
Since: ArcGIS API for JavaScript 4.16

Clears the current slice.

clearSlice()
Deprecated since version 4.16. Use clear instead.

Clears the current slice.

newSlice()
Deprecated since version 4.16. Use start instead.

Starts a new slice.

start()
Since: ArcGIS API for JavaScript 4.16

Starts a new slice.

API Reference search results

NameTypeModule
Loading...