How to use the @here/harp-geojson-datasource/lib/GeoJsonDataSource.GeoJsonDataSource function in @here/harp-geojson-datasource

To help you get started, we’ve selected a few @here/harp-geojson-datasource examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / harp.gl / @here / harp-examples / src / xyz_show_space.ts View on Github external
function addGeoJsonDataSource(baseUrl: string, spaceId: string, token: string) {
        // snippet:xyz_1.ts
        const xyzDataProvider = new XYZDataProvider({ baseUrl, spaceId, token });
        const geoJsonDataSource = new GeoJsonDataSource({
            dataProvider: xyzDataProvider,
            name: "geojson"
        });
        mapView.addDataSource(geoJsonDataSource).then(() => {
            updateGeoJsonTheme(defaultTheme);
        });
        // end:xyz_1.ts
    }