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:
|
- 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
materialMaterialProperty
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
zIndexConstantProperty
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 resultRectangleGraphics 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 sourceRectangleGraphics An object that provides attribute values.