Class: PolylineGraphics

PolylineGraphics

new PolylineGraphics(options)

Draw Line Class

Name Type Description
options Object optional

Object is an object that contains the following properties:

Name Type Default Description
show Property true optional

Boolean attribute, specifying the visibility of the line.

positions Property optional

Cartesian3 array, which defines lines.

width Property 1.0 optional

The number attribute specifies the pixel width of the line.

granularity Property SuperMap3D.Math.RADIANS_PER_DEGREE optional

The number property specifies the angular distance of each point on the line when arcType is not ArcType.NONE and clampToGround is false.

material MaterialProperty Color.WHITE optional

The MaterialProperty property specifies the material used to fill the line.

depthFailMaterial MaterialProperty optional

The MaterialProperty property specifies the material used to fill lines when depth testing fails.

arcType ArcType ArcType.GEODESIC optional

Line segment type.

clampToGround Property false optional

Boolean property, specifying whether the line is grounded.

shadows Property ShadowMode.DISABLED optional

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

distanceDisplayCondition Property optional

The DistanceDisplayCondition property specifies how far the line is 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

The number attribute is used to specify the zIndex of the rectangle, which is used to sort the grounded geometry. This effect only works when the line clampToGround is true and the line is on terrain.

See:

Members

arcTypeProperty

Gets or sets the ArcType property, which specifies whether the line segment should be a large arc, a constant direction line, or a linear connection.

Default Value:
ArcType.GEODESIC

clampToGroundProperty

Get or set boolean property to specify whether the line is grounded.

Default Value:
false

classificationTypeProperty

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

Default Value:
ClassificationType.BOTH

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.

depthFailMaterialMaterialProperty

Get or set the MaterialProperty property to specify the material used to fill lines when depth testing fails

This attribute requires the use of the EXT_frag_depth WebGL extension. If this extension is not supported, there may be rendering flaws.

Default Value:
undefined

distanceDisplayConditionProperty

Get or set the DistanceDisplayCondition property to specify how far the line is displayed from the camera.

granularityProperty

Get the set number property, specifying the angular distance of each point on the line when arcType is not ArcType.NONE and clampToGround is false.

Default Value:
SuperMap3D.Math.RADIANS_PER_DEGREE

Get or set the MaterialProperty property to specify the material used for filling lines.

Default Value:
Color.WHITE

positionsProperty

Get or set the Cartesian3 array, which defines lines.

shadowsProperty

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

Default Value:
ShadowMode.DISABLED

showProperty

Get the visibility of the setting line, of type boolean.

Default Value:
true

widthProperty

Get the number property and specify the pixel width of the line.

Default Value:
1.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 when the line clampToGround is true and the line is on terrain.

Default Value:
0

Methods

clone(result){PolylineGraphics}

Copy instance

Name Type Description
result PolylineGraphics optional

The object that stores the copied results

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

An object that provides attribute values.