Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const lookAt = mergeWithOptions(defaultLookAt, options.lookAt);
mapView.lookAt(
new GeoCoordinates(lookAt.latitute, lookAt.longitude),
lookAt.distance,
lookAt.tilt,
lookAt.azimuth
);
// Shutdown errors cause by firefox bug
mapView.renderer.getContext().getShaderInfoLog = (x: any) => {
return "";
};
const geoJsonDataSource = new OmvDataSource({
decoder: new OmvTileDecoder(),
dataProvider: new GeoJsonDataProvider(
"geojson",
typeof options.geoJson === "string"
? new URL(options.geoJson, window.location.href)
: options.geoJson,
{ tiler: new GeoJsonTiler() }
),
name: "geojson",
styleSetName: "geojson"
});
mapView.addDataSource(geoJsonDataSource);
await waitForEvent(mapView, MapViewEventNames.FrameComplete);
await ibct.assertCanvasMatchesReference(canvas, options.testImageName);
this.m_mapView.lookAt(
this.m_mapViewState.target,
this.m_mapViewState.distance,
this.m_mapViewState.tilt,
this.m_mapViewState.azimuth
);
this.m_datasource = new OmvDataSource({
baseUrl: "https://xyz.api.here.com/tiles/herebase.02",
apiFormat: APIFormat.XYZOMV,
styleSetName: style || undefined,
maxZoomLevel: 17,
authenticationCode: accessToken,
copyrightInfo: this.m_copyrights,
decoder: new OmvTileDecoder()
});
this.m_copyrightHandler = CopyrightElementHandler.install(
this.m_copyrightElem,
this.m_mapView
);
this.m_mapView.addEventListener(
MapViewEventNames.MovementFinished,
this.onMovementFinished
);
this.m_mapView.addDataSource(this.m_datasource);
this.m_mapView.addEventListener(MapViewEventNames.Render, this.onMapRender);
this.emit("mapCreated");
constructor() {
this.m_highlightDataSource = new OmvDataSource({
name: "decorations",
baseUrl: "https://xyz.api.here.com/tiles/herebase.02",
apiFormat: APIFormat.XYZOMV,
styleSetName: "tilezen",
maxZoomLevel: 17,
authenticationCode: accessToken,
decoder: new OmvTileDecoder()
});
}