flywave-features-datasource.featuresdatasource
Home > @flywave/flywave-features-datasource > FeaturesDataSource
FeaturesDataSource class
[[DataSource]] implementation to use for the addition of custom features.
Signature:
export declare class FeaturesDataSource extends VectorTileDataSource
Extends: VectorTileDataSource
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Builds a |
Methods
Method | Modifiers | Description |
|---|---|---|
Adds a custom feature in the datasource. | ||
Override [[DataSource.attach]] to know if we're really connected to [[MapView]]. | ||
Removes all the custom features in this | ||
Override [[DataSource.detach]] to know if we're really connected to [[MapView]]. | ||
Get [[GeoBox]] containing all the points in datasource. Returns undefined if there were no features added to this DS. | ||
Removes a custom feature in the datasource. | ||
This method allows to directly add a GeoJSON without using [[MapViewFeature]] instances. It also overwrites existing features in this data source. To add a GeoJSON without overwriting the data source, one should loop through it to create [[MapViewFeature]] and add them with the |