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

Provides the shape definition of a slice plane for the Slice widget. The slice plane is defined by a position, heading and tilt. Its size is defined by width and height.

slice-plane

The plane can be set or retrieved from the shape property of the SliceViewModel.

let sliceWidget = new Slice({
  view: view
});
sliceWidget.viewModel.shape = new SlicePlane({
  position: new Point({
    latitude: 34.06007911204149,
    longitude: -117.1867758409791,
    z: 416.852
  }),
  // a 30 degree angle between the slice plane and the ground plane
  tilt: 30,
  width: 32,
  height: 32,
  // the height plane axis is oriented North
  heading: 0
});
sliceWidget.viewModel.start();
view.ui.add(sliceWidget, "top-right");
See also:

Constructors

new SlicePlane(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
Number

The heading angle (in degrees) of the slice plane.

more details
more detailsSlicePlane
Number

The height of the slice plane.

more details
more detailsSlicePlane
Point

A point specifying the position of the center of the plane.

more details
more detailsSlicePlane
Number

The tilt angle (in degrees) of the slice plane.

more details
more detailsSlicePlane
String

The string value representing the type of the slice shape.

more details
more detailsSlicePlane
Number

The width of the slice plane.

more details
more detailsSlicePlane

Property Details

declaredClass Stringreadonly inherited

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

heading Number

The heading angle (in degrees) of the slice plane.

Default Value:0
height Number

The height of the slice plane. The unit is derived from the SpatialReference of the position.

Default Value:10
position Point

A point specifying the position of the center of the plane.

tilt Number

The tilt angle (in degrees) of the slice plane.

Default Value:0
type Stringreadonly

The string value representing the type of the slice shape.

For SlicePlane the type is always "plane".

width Number

The width of the slice plane. The unit is derived from the SpatialReference of the position.

Default Value:10

Method Overview

NameReturn TypeSummaryClass
SlicePlane

Creates a deep clone of the slice plane object.

more details
more detailsSlicePlane
*

Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform.

more details
more detailsSlicePlane
Object

Converts an instance of this class to its ArcGIS portal JSON representation.

more details
more detailsSlicePlane

Method Details

clone(){SlicePlane}

Creates a deep clone of the slice plane object.

Returns:
TypeDescription
SlicePlaneA deep clone of the SlicePlane instance that invoked this method.
Example:
// clone the shape since it cannot be directly modified
var newSlicePlane = viewModel.shape.clone();
newSlicePlane.heading += 30;

// set the new slice plane
viewMoodel.shape = newSlicePlane;
fromJSON(json){*}static

Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter:
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns:
TypeDescription
*Returns a new instance of this class.
toJSON(){Object}

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns:
TypeDescription
ObjectThe ArcGIS portal JSON representation of an instance of this class.

API Reference search results

NameTypeModule
Loading...