跳到主要内容

flywave-geojson-datasource.geojsondatasource

Home > @flywave/flywave-geojson-datasource > GeoJsonDataSource

GeoJsonDataSource class

GeoJsonDataSource is used for the visualization of geometric objects provided in the GeoJSON format. To be able to render GeoJSON data, a GeoJsonDataSource instance must be added to the MapView instance.

Signature:

export declare class GeoJsonDataSource extends VectorTileDataSource 

Extends: VectorTileDataSource

Example

   const geoJsonDataProvider = new GeoJsonDataProvider(
"italy",
new URL("resources/italy.json", window.location.href)
);
const geoJsonDataSource = new GeoJsonDataSource({
dataProvider: geoJsonDataProvider,
styleSetName: "geojson"
});
mapView.addDataSource(geoJsonDataSource);

Constructors

Constructor

Modifiers

Description

(constructor)(params)

Default constructor.