Appearance
WallEntity (Wall Entity Vector Data)
Create and manage wall Entity objects.
Constructor
typescript
new ge3d.feature.WallEntity(options?: any): WallEntityParameters
Common Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| positions | LatLngPoint[] | Cesium.Cartesian3[] | Cesium.PositionProperty | - | Coordinate position |
| style | WallEntity.StyleOptions | - | Style information |
| attr | Object | - | Additional attribute information, can add any attributes, automatically handled when exporting geojson or json |
| hasMoveEdit | Boolean | true | Whether to allow overall translation when drawing |
| minPointNum | Number | 2 | Minimum number of points required when drawing |
| maxPointNum | Number | 9999 | Maximum number of points allowed when drawing |
| addHeight | Number | 0 | Height value added to drawing points when drawing |
| availability | Cesium.TimeIntervalCollection | - | Availability associated with this object (if any) |
| description | Cesium.Property | string | - | String property specifying HTML description of this entity (displayed in infoBox) |
| viewFrom | Cesium.Property | - | Suggested initial offset when viewing this object |
| parent | Cesium.Entity | - | Parent entity to associate with this entity |
| onBeforeCreate | Function | - | Callback method before new Cesium.Entity(addattr), can do additional personalized processing on addattr |
StyleOptions Style Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| diffHeight | Number | 100 | Wall height |
| minimumHeights | Array<number> | - | When diffHeight is not specified, can specify height array for wall bottom instead of ellipsoid surface |
| maximumHeights | Array<number> | - | When diffHeight is not specified, can specify height array for wall top instead of height at each position |
| fill | Boolean | true | Whether to fill |
| materialType | String | "Color" | Fill type, options: {@link MaterialType} |
| materialParameters | * | - | Determined by specific {@link MaterialType} |
| material | Cesium.MaterialProperty | Cesium.Color | Cesium.Color.WHITE | Material used for filling, overrides materialType and material parameters when specified |
| color | String | "#00FF00" | Color |
| opacity | Number | 1.0 | Opacity, range 0.0-1.0 |
| closure | Boolean | false | Whether to close |
| outline | Boolean | false | Whether to have outline |
| outlineWidth | String | 1 | Outline width |
| outlineColor | String | Cesium.Color | "#ffffff" | Outline color |
| outlineOpacity | Number | 0.6 | Outline opacity |
| distanceDisplayCondition | Boolean | Cesium.DistanceDisplayCondition | false | Whether to display by distance or specify at what distance from camera this will be displayed |
| distanceDisplayCondition_far | Number | 100000 | Maximum distance |
| distanceDisplayCondition_near | Number | 0 | Minimum distance |
| hasShadows | Boolean | false | Whether to cast shadows |
| shadows | Cesium.ShadowMode | Cesium.ShadowMode.DISABLED | Specify whether wall casts or receives shadows from light sources |
| granularity | number | Cesium.Math.RADIANS_PER_DEGREE | Specify angular distance between each latitude and longitude point |
| 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 | WallEntity.StyleOptions | - | Highlight style on hover or click (type:'click'), can also be toggled via openHighlight/closeHighlight methods after creating Graphic |
| label | LabelEntity.StyleOptions | - | Support for additional text display |
| label.position | String | LatLngPoint | - | Text position, default is center property value of vector object itself. Support 'center': internal center point coordinates of enclosed surface, '{xxxx}' configure attribute field, or directly specify coordinate values |
| label.showAll | Boolean | - | For MultiPolygon and MultiLineString, whether to display all annotations, default only displays on surface or line with maximum coordinates |
Properties
| Property | Type | Description |
|---|---|---|
| _layer | any | Belonging layer |
| _events | any | Bound events. Pass data through callback methods |
| centerOfMass | any | Polygon center |
| area | number | Area (getter) |
| attr | any | Input attribute information (getter) |
| center | any | Center point coordinates (Cartesian coordinates) (getter) |
| distance | number | Polygon length (getter) |
| entityGraphic | any | Specific type object of Cesium internal object corresponding to vector data (getter) |
| hasEdit | boolean | Whether editable (getter) |
| isAdded | boolean | Whether added to layer (getter) |
| isDestroy | boolean | Whether destroyed (getter) |
| isEditing | any | Whether in editing state (getter) |
| label | any | Additional label text object (getter) |
| minOuterRectangle | any | Minimum outer rectangle (setter) |
| show | any | Show/hide state (getter) |
| style | any | Style information (getter) |
| rectangle | any | Rectangle boundary corresponding to coordinate data (getter) |
Methods
| Method | Parameters | Return Value | Description |
|---|---|---|---|
| addEventListener | types: any, fn: any, context?: any | this | Event binding |
| clear | - | void | Clear elements |
| destroy | noDel?: boolean | void | Destroy elements |
| flyTo | options?: any | undefined | PolygonEntity | Fly to view angle where data is located |
| getCenterOfMass | - | any | Internal center point coordinates of enclosed surface |
| getCoordinates | noAlt?: undefined, closure?: undefined | any[][] | Get latitude and longitude coordinates |
| getPositions | - | any | Position coordinate array (Cartesian coordinates), can pass LatLngPoint array object or Cesium.PolygonHierarchy when assigning |
| getSetHeight | style?: any, index?: number | any | Get set elevation |
| getPositionsShow | - | any | Actually displayed coordinate array (Cartesian coordinates), when plotting, positions may correspond to control point coordinates or CallbackProperty properties |
| removeEventListener | types: any, fn: any, context?: any | this | Remove event binding |
| setOpacity | value: number | void | Set opacity |
| setOptions | options: { attr: any; position: any; positions: any; style: any } | this | Set Options parameters |
| setPositions | value: any | void | Set coordinates |
| setStyle | newStyle: any | this | Set style |
| toGeoJSON | options: any | object | Convert to geojson |
| toWKT | options: any | any | Convert to wkt |