Appearance
FeatureLayer (Vector Feature Layer)
Layer for managing various types of vector features.
Constructor
ts
new ge3d.object.FeatureLayer(options?: any): FeatureLayerParameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| id | String/Number | uuid() | Layer id identifier |
| name | String | 'Unnamed' | Layer name |
| show | Boolean | true | Whether layer is displayed |
| flyTo | Boolean | - | Whether to automatically fly to data area after loading data |
| opacity | Number | 1.0 | Opacity |
| hasEdit | Boolean | false | Whether to automatically activate editing |
| isAutoEditing | Boolean | true | Whether to automatically start editing after completing plotting |
| data | Object/Object[] | null | Data to be automatically loaded |
| clustering | Object | - | Point data clustering related parameters |
Properties
| Property | Type | Description |
|---|---|---|
| clustering | any | Whether to cluster (for point data) |
| features | any[] | Collection of Feature objects within the layer |
| id | any | Object id identifier |
| show | Boolean | Show/hide state |
| opacity | Number | Opacity |
Methods
addFeature
Add feature
ts
addFeature(feature: any[]): anyclear
Clear features
ts
clear(hasDestory?: boolean): voidtoGeoJSON
Convert vector features to geojson
ts
toGeoJSON(options: any): { features: any; layer: { id: any; name: any }; type: string }