SlicePlane
require(["esri/widgets/Slice/SlicePlane"], function(SlicePlane) { /* code goes here */ });
esri/widgets/Slice/SlicePlane
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.
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 Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
Number | The heading angle (in degrees) of the slice plane. more details | more details | SlicePlane | |
Number | The height of the slice plane. more details | more details | SlicePlane | |
Point | A point specifying the position of the center of the plane. more details | more details | SlicePlane | |
Number | The tilt angle (in degrees) of the slice plane. more details | more details | SlicePlane | |
String | The string value representing the type of the slice shape. more details | more details | SlicePlane | |
Number | The width of the slice plane. more details | more details | SlicePlane |
Property Details
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
Name | Return Type | Summary | Class | |
---|---|---|---|---|
SlicePlane | Creates a deep clone of the slice plane object. more details | more details | SlicePlane | |
* | 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 details | SlicePlane | |
Object | Converts an instance of this class to its ArcGIS portal JSON representation. more details | more details | SlicePlane |
Method Details
- clone(){SlicePlane}
Creates a deep clone of the slice plane object.
Returns:Type Description SlicePlane A 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 ObjectA 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:Type Description * 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:Type Description Object The ArcGIS portal JSON representation of an instance of this class.