Skip to content

FeatureLayer (Vector Feature Layer)

Layer for managing various types of vector features.

Constructor

ts
new ge3d.object.FeatureLayer(options?: any): FeatureLayer

Parameters

ParameterTypeDefaultDescription
idString/Numberuuid()Layer id identifier
nameString'Unnamed'Layer name
showBooleantrueWhether layer is displayed
flyToBoolean-Whether to automatically fly to data area after loading data
opacityNumber1.0Opacity
hasEditBooleanfalseWhether to automatically activate editing
isAutoEditingBooleantrueWhether to automatically start editing after completing plotting
dataObject/Object[]nullData to be automatically loaded
clusteringObject-Point data clustering related parameters

Properties

PropertyTypeDescription
clusteringanyWhether to cluster (for point data)
featuresany[]Collection of Feature objects within the layer
idanyObject id identifier
showBooleanShow/hide state
opacityNumberOpacity

Methods

addFeature

Add feature

ts
addFeature(feature: any[]): any

clear

Clear features

ts
clear(hasDestory?: boolean): void

toGeoJSON

Convert vector features to geojson

ts
toGeoJSON(options: any): { features: any; layer: { id: any; name: any }; type: string }