Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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
}