How to use the @here/harp-omv-datasource.APIFormat.XYZMVT function in @here/harp-omv-datasource

To help you get started, we’ve selected a few @here/harp-omv-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 / datasource_xyzmvt.ts View on Github external
// react on resize events
        window.addEventListener("resize", () => {
            map.resize(window.innerWidth, window.innerHeight);
        });
        // end:harp_gl_datasource_xyzmvt_example_3.ts

        return map;
    }

    const mapView = initializeMapView("mapCanvas");

    // snippet:harp_gl_datasource_xyzmvt_example_4.ts
    const omvDataSource = new OmvDataSource({
        baseUrl: "https://xyz.api.here.com/tiles/osmbase/256/all",
        apiFormat: APIFormat.XYZMVT,
        styleSetName: "tilezen",
        maxZoomLevel: 17,
        authenticationCode: accessToken
    });
    // end:harp_gl_datasource_xyzmvt_example_4.ts

    // snippet:harp_gl_datasource_xyzmvt_example_5.ts
    mapView.addDataSource(omvDataSource);
    // end:harp_gl_datasource_xyzmvt_example_5.ts
}