Class: PolygonGraphics

PolygonGraphics

new PolygonGraphics(options)

Draw polygon classes

Name Type Description
options Object optional

Object is an object that contains the following properties:

Name Type Default Description
hierarchy Property optional

Specify the properties of PolygonHierarchy.

height Property 0 optional

The number attribute specifies the height of the polygon relative to the surface of the ellipsoid.

heightReference Property optional

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

extrudedHeight Property optional

The number attribute specifies the extrusion height of the polygon relative to the ellipsoid surface.

extrudedHeightReference Property optional

The HeightReference property specifies the relative reference point for extradedHeight.

show Property true optional

Boolean attribute, specifying the visibility of polygons.

fill Property true optional

Boolean attribute, used to specify whether the polygon is filled with the provided material.

material MaterialProperty Color.WHITE optional

Specify the properties of the material used to fill polygons.

outline Property false optional

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

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.

stRotation Property 0.0 optional

The number attribute specifies the angle at which the polygon texture rotates counterclockwise from north.

granularity Property SuperMap3D.Math.RADIANS_PER_DEGREE optional

The number attribute specifies the angular distance between each latitude and longitude point of the polygon.

perPositionHeight Property false optional

Boolean property, used to specify whether the height of each position is used.

closeTop Boolean true optional

Boolean property, when false, the top extruded by the polygon is not drawn.

closeBottom Boolean true optional

Boolean property, when false, the bottom extruded by the polygon is not drawn.

shadows Property ShadowMode.DISABLED optional

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

distanceDisplayCondition Property optional

The DistanceDisplayCondition property specifies how far the polygon is displayed from the camera.

classificationType Property ClassificationType.BOTH optional

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

arcType Property ArcType.GEODESIC optional

ArcType is the type of polygon edge line

zIndex ConstantProperty 0 optional

The number attribute is used to specify the zIndex of the rectangle, which is used to sort the grounded geometry. This only works if PolygonGraphics.High and PolygonGraphics # extradedHeight are not specified and the polygon is static.

See:

Members

arcTypeProperty

Get or set the ArcType property ArcType, the type of polygon edge line

Default Value:
ArcType.GEODESIC

classificationTypeProperty

Gets or sets the ClassityType property, specifying whether the polygon classifies terrain, 3D tiles, or both on the ground.

Default Value:
ClassificationType.BOTH

closeBottomProperty

Gets or sets a boolean value, specifying whether to draw the bottom of the extruded polygon.

closeTopProperty

Gets or sets a boolean value, specifying whether to draw the top of the extruded polygon.

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 to specify the polygon extrusion height. If PolygonGraphics # perPositionHeight is false, the volume starts from PolygonGraphics # height and ends at this height. If PolygonGraphics # perPositionHeight is true, the volume starts from the height of each PolygonGraphics # hierarchy position and ends at that height.

extrudedHeightReferenceProperty

Get or set the HeightReference property. Used to specify the relative reference point for extradedHeight.

Default Value:
HeightReference.NONE

fillProperty

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

Default Value:
true

granularityProperty

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

Default Value:
{CesiumMath.RADIANS_PER_DEGREE}

groundBottomAltitudeConstantProperty

Set or retrieve the number property to specify the height of the bottom of the polygon.

groundExtrudedHeightConstantProperty

Set or retrieve the number attribute to specify the height of polygon extrusion.

Default Value:
0.0

heightProperty

Get or set the number property. Used to specify the height of a polygon.

Default Value:
0.0

heightReferenceProperty

Get or set the HeightReference property.

Default Value:
HeightReference.NONE

hierarchyProperty

Get or set the PolygonHierarchy property.

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

Default Value:
Color.WHITE

outlineProperty

Gets or sets the boolean property 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

perPositionHeightProperty

Gets or sets the boolean property to specify whether to use the height of each position. If set to true, the height of the shape will be determined by the height of each PolygonGraphics # hierarchy position. If set to 'false', the height of the shape will remain unchanged, as specified by PolygonGraphics # height.

shadowsProperty

Gets or sets enumeration properties to specify whether a polygon 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

Get or set the number property to specify the angle at which the polygon texture rotates counterclockwise from north to south.

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 value only takes effect if PolygonGraphics'high and PolygonGraphics# extradedHeight are not specified and the polygon is static.

Default Value:
0

Methods

clone(result){PolygonGraphics}

Copy instance

Name Type Description
result PolygonGraphics optional

The object that stores the copied results

Returns:
Type Description
PolygonGraphics 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 PolygonGraphics

An object that provides attribute values.