Class: RectangleGraphics

RectangleGraphics

new RectangleGraphics(options)

Draw rectangle class Rectangle

You can draw a rectangle that conforms to the curvature of the Earth. The rectangle can be placed on the surface of the Earth, at a certain height, or extruded as an individual

Name Type Description
options Object optional

Object is an object that contains the following properties:

Name Type Default Description
show Property true optional

Boolean property, used to specify the visibility of rectangles.

coordinates Property optional

Specify the properties of Rectangle.

height Property 0 optional

The number attribute specifies the height of a rectangle equivalent to the surface of an ellipsoid.

heightReference Property HeightReference.NONE optional

The HeightReference property specifies the relative reference height of the height.

extrudedHeight Property optional

The number attribute specifies the height of the rectangular extruded surface relative to the ellipsoidal surface.

extrudedHeightReference Property HeightReference.NONE optional

Property that specifies the relative reference point for RectangleGraphics # extradedHeight.

rotation Property 0.0 optional

The number attribute specifies the angle at which the rectangle rotates clockwise from north.

stRotation Property 0.0 optional

The number attribute is used to specify the angle at which the rectangular texture rotates counterclockwise from north.

granularity Property SuperMap3D.Math.RADIANS_PER_DEGREE optional

The number attribute specifies the angular distance between points on a rectangle.

fill Property true optional

Boolean property, used to specify whether the rectangle is filled with the provided material.

material MaterialProperty Color.WHITE optional

Material properties, used to specify the material for filling rectangles.

outline Property false optional

Boolean property, used to specify whether to display the outline of a rectangle.

outlineColor Property Color.BLACK optional

The Color property specifies the color of the contour.

outlineWidth Property 1.0 optional

The number attribute specifies the width of the contour.

shadows Property ShadowMode.DISABLED optional

Enumeration properties used to specify whether a rectangle casts or receives shadows from each light source.

distanceDisplayCondition Property optional

Attribute, specifying how far the rectangle should be displayed from the camera.

classificationType Property ClassificationType.BOTH optional

The ClassityType property specifies whether the rectangle classifies terrain, 3DTile, or both.

zIndex Property 0 optional

Attribute, used to specify the zIndex of the rectangle, which is used to sort the grounded geometry. This effect only works if RectangleGraphics # height and RectangleGraphics # extradedHeight are not specified and the rectangle is static.

See:

Members

classificationTypeProperty

Get or set the ClassityType property, specifying whether the rectangle classifies terrain, 3DTile, or both.

Default Value:
ClassificationType.BOTH

coordinatesProperty

Get or set the properties of the specified Rectangle.

readonly definitionChangedEvent

Get events. This event is thrown when the value of a property or sub property is modified, or when the definition is modified.

distanceDisplayConditionProperty

Get or set the DistanceDisplayCondition property to specify how far the rectangle should be displayed from the camera.

extrudedHeightProperty

Get or set the number property, which specifies the altitude at which the rectangle is extruded. After setting this attribute, a rectangular prism will be created. The rectangular prism starts from RectangleGraphics # height and ends at RectangleGraphics # extradedHeight.

extrudedHeightReferenceProperty

Get or set a property that specifies the reference point HeightReference for the extrusion height

Default Value:
HeightReference.NONE

fillProperty

Gets or sets the boolean property, specifying whether to fill the rectangle with the provided material.

Default Value:
true

granularityProperty

Get or set the number property to specify the angular distance between points on a rectangle.

Default Value:
{CesiumMath.RADIANS_PER_DEGREE}

heightProperty

Get or set the number property to specify the height of the rectangle.

Default Value:
0.0

heightReferenceProperty

Get or set the HeightReference property.

Default Value:
HeightReference.NONE

Get or set the MaterialProperty property to specify the material used to fill the rectangle.

Default Value:
Color.WHITE

outlineProperty

Gets or sets Boolean properties to specify whether to display the outline of a rectangle.

Default Value:
false

outlineColorProperty

Get or set the Color property to specify the color of the contour.

Default Value:
Color.BLACK

outlineWidthProperty

Get or set the number property to specify the contour width.

Default Value:
1.0

rotationProperty

Gets or sets the number property to specify the angle at which the rectangle rotates clockwise from north.

Default Value:
0

shadowsProperty

Gets or sets enumeration properties to specify whether a rectangle casts or receives shadows from each light source.

Default Value:
ShadowMode.DISABLED

showProperty

Get the visibility of the set rectangle, of type boolean.

Default Value:
true

stRotationProperty

Gets or sets the number property to specify the angle at which the rectangular texture rotates counterclockwise from north.

Default Value:
0

Get or set the number property to specify the zIndex of the rectangle, which is used to sort the grounded geometry. This effect only works if RectangleGraphics # height and RectangleGraphics # extradedHeight are not specified and the rectangle is static.

Default Value:
0

Methods

clone(result){RectangleGraphics}

Copy instance

Name Type Description
result RectangleGraphics optional

The object that stores the copied results.

Returns:
Type Description
RectangleGraphics If input parameters are provided, return the modified input parameter object. If no input parameters are provided, return a new instance.

merge(source)

Assign the attribute values corresponding to the source object to all unspecified attributes of this instance.

Name Type Description
source RectangleGraphics

An object that provides attribute values.