Appearance
CirclePrimitive (Circle Primitive Vector Object)
Circle primitive vector object.
Constructor
ts
new ge3d.feature.CirclePrimitive(options?: any): CirclePrimitiveParameters
StyleOptions
| Parameter | Type | Default | Description |
|---|---|---|---|
| radius | Number | 100 | Radius |
| height | Number | 0 | Elevation, height of circle relative to ellipsoid surface |
| diffHeight | Number | 100 | Height difference (cylinder's own height), mutually exclusive with extrudedHeight |
| extrudedHeight | number | - | Specify height of extruded surface of circle relative to ellipsoid |
| stRotation | Number | 0 | Ellipse texture angle (radians), 0 is north, counterclockwise |
| stRotationDegree | Number | 0 | Ellipse texture angle (degrees, 0-360), mutually exclusive with stRotation |
| granularity | number | Cesium.Math.RADIANS_PER_DEGREE | Specify angular distance between points on ellipse |
| materialType | String | "Color" | Fill material type, options: MaterialType |
| material | Material | - | Material used for filling, overrides materialType and material parameters when specified |
| color | String/Cesium.Color | "#00FF00" | Color |
| opacity | Number | 1.0 | Opacity, range 0.0-1.0 |
| outline | Boolean | false | Whether to have outline |
| outlineColor | String/Cesium.Color | "#ffffff" | Outline color |
| outlineOpacity | Number | 0.6 | Outline opacity |
| materialSupport | Cesium.MaterialAppearance.MaterialSupportType | Cesium.MaterialAppearance.MaterialSupport.TEXTURED | Material types that will be supported |
| clampToGround | String | false | Whether to clamp to ground |
| classificationType | Cesium.ClassificationType | Cesium.ClassificationType.BOTH | Specify coverage type when clamped to ground |
| classification | Boolean | false | Whether it is ClassificationPrimitive |
| setHeight | Number | 0 | Specify coordinate height value (commonly used in layer configuration) |
| addHeight | Number | 0 | Height value added to existing coordinates (commonly used in layer configuration) |
| highlight | CirclePrimitive.StyleOptions | - | Highlight style on hover or click |
| label | LabelEntity.StyleOptions | - | Support for additional text display |
Constructor Parameters
| Parameter | Type | Description |
|---|---|---|
| position | LatLngPoint/Cesium.Cartesian3 | Coordinate position |
| style | CirclePrimitive.StyleOptions | Style information |
| attr | Object | Additional attribute information, can add any attributes |
| modelMatrix | Cesium.Matrix4 | 4x4 transformation matrix that transforms primitive (all geometry instances) from model to world coordinates |
Properties
| Property | Type | Description |
|---|---|---|
| attr | any | Attribute information |
| center | any | Center point coordinates (Cartesian coordinates) |
| centerPoint | LatLngPoint | Center point coordinates (latitude and longitude coordinates) |
| distance | number | Length |
| heading | any | Direction angle around, 0-360 degree angle value |
| height | number | Height value corresponding to coordinates (unit: meters) |
| id | any | Object id identifier |
| isAdded | boolean | Whether added to layer |
| isDestroy | boolean | Whether destroyed |
| label | any | Additional label text object |
| modelMatrix | any | 4x4 transformation matrix that transforms primitive (all geometry instances) from model to world coordinates |
| name | any | Name (can be repeated) |
| radius | any | Circle radius (unit: meters) |
| point | LatLngPoint | Position coordinates |
| roll | any | Roll angle, left-right tilt angle, 0-360 degree angle value |
| style | any | Style 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): booleanaddEventListener
Add feature events
ts
addEventListener(types: any, fn: any, context?: any): thisclampToGround
Asynchronously calculate and update coordinates for ground clamping (or model clamping)
ts
clampToGround(options?: any): BillboardPrimitiveclear
Clear features
ts
clear(): voidcloseHighlight
Clear selected highlight
ts
closeHighlight(): voiddestroy
Destroy features
ts
destroy(noDel?: boolean): voidflyTo
Fly to view angle where data is located
ts
flyTo(options?: any): undefined | BillboardPrimitivegetCoordinate
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(): anysetStyle
Set style information
ts
setStyle(style: any): voidremove
Remove object
ts
remove(): void