Skip to content

CirclePrimitive (Circle Primitive Vector Object)

Circle primitive vector object.

Constructor

ts
new ge3d.feature.CirclePrimitive(options?: any): CirclePrimitive

Parameters

StyleOptions

ParameterTypeDefaultDescription
radiusNumber100Radius
heightNumber0Elevation, height of circle relative to ellipsoid surface
diffHeightNumber100Height difference (cylinder's own height), mutually exclusive with extrudedHeight
extrudedHeightnumber-Specify height of extruded surface of circle relative to ellipsoid
stRotationNumber0Ellipse texture angle (radians), 0 is north, counterclockwise
stRotationDegreeNumber0Ellipse texture angle (degrees, 0-360), mutually exclusive with stRotation
granularitynumberCesium.Math.RADIANS_PER_DEGREESpecify angular distance between points on ellipse
materialTypeString"Color"Fill material type, options: MaterialType
materialMaterial-Material used for filling, overrides materialType and material parameters when specified
colorString/Cesium.Color"#00FF00"Color
opacityNumber1.0Opacity, range 0.0-1.0
outlineBooleanfalseWhether to have outline
outlineColorString/Cesium.Color"#ffffff"Outline color
outlineOpacityNumber0.6Outline opacity
materialSupportCesium.MaterialAppearance.MaterialSupportTypeCesium.MaterialAppearance.MaterialSupport.TEXTUREDMaterial types that will be supported
clampToGroundStringfalseWhether to clamp to ground
classificationTypeCesium.ClassificationTypeCesium.ClassificationType.BOTHSpecify coverage type when clamped to ground
classificationBooleanfalseWhether it is ClassificationPrimitive
setHeightNumber0Specify coordinate height value (commonly used in layer configuration)
addHeightNumber0Height value added to existing coordinates (commonly used in layer configuration)
highlightCirclePrimitive.StyleOptions-Highlight style on hover or click
labelLabelEntity.StyleOptions-Support for additional text display

Constructor Parameters

ParameterTypeDescription
positionLatLngPoint/Cesium.Cartesian3Coordinate position
styleCirclePrimitive.StyleOptionsStyle information
attrObjectAdditional attribute information, can add any attributes
modelMatrixCesium.Matrix44x4 transformation matrix that transforms primitive (all geometry instances) from model to world coordinates

Properties

PropertyTypeDescription
attranyAttribute information
centeranyCenter point coordinates (Cartesian coordinates)
centerPointLatLngPointCenter point coordinates (latitude and longitude coordinates)
distancenumberLength
headinganyDirection angle around, 0-360 degree angle value
heightnumberHeight value corresponding to coordinates (unit: meters)
idanyObject id identifier
isAddedbooleanWhether added to layer
isDestroybooleanWhether destroyed
labelanyAdditional label text object
modelMatrixany4x4 transformation matrix that transforms primitive (all geometry instances) from model to world coordinates
nameanyName (can be repeated)
radiusanyCircle radius (unit: meters)
pointLatLngPointPosition coordinates
rollanyRoll angle, left-right tilt angle, 0-360 degree angle value
styleanyStyle information

Methods

getOutlineCoordinates

Get boundary coordinates

ts
getOutlineCoordinates(param1?: boolean, param2?: any, param3?: any): any[]

isInPoly

Determine if point is inside circle

ts
isInPoly(position: Cartesian3): boolean

addEventListener

Add feature events

ts
addEventListener(types: any, fn: any, context?: any): this

clampToGround

Asynchronously calculate and update coordinates for ground clamping (or model clamping)

ts
clampToGround(options?: any): BillboardPrimitive

clear

Clear features

ts
clear(): void

closeHighlight

Clear selected highlight

ts
closeHighlight(): void

destroy

Destroy features

ts
destroy(noDel?: boolean): void

flyTo

Fly to view angle where data is located

ts
flyTo(options?: any): undefined | BillboardPrimitive

getCoordinate

Position coordinates (array object), example [113.123456,31.123456,30.1]

ts
getCoordinate(noAlt?: undefined): any[]

getPosition

Position coordinates (Cartesian coordinates), can pass LatLngPoint object when assigning

ts
getPosition(): any

setStyle

Set style information

ts
setStyle(style: any): void

remove

Remove object

ts
remove(): void