Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
return tile;
}
// end:vislib_datasource_simple_5.ts
}
const mapView = initializeMapView("mapCanvas");
// snippet:vislib_datasource_simple_6.ts
const simpleDataSource = new SimpleDataSource();
mapView.addDataSource(simpleDataSource);
// end:vislib_datasource_simple_6.ts
// snippet:vislib_datasource_simple_7.ts
const debugDataSource = new DebugTileDataSource(webMercatorTilingScheme);
mapView.addDataSource(debugDataSource);
// end:vislib_datasource_simple_7.ts
}
tilingScheme: webMercatorTilingScheme,
dataProvider: new CustomDataProvider(),
// If you specify the decoder directly instead of the
// concurrentDecoderServiceName the decoding will
// happen in the main thread. This is useful for
// debugging or if creating a decoder bundle is not
// possible.
// decoder: new CustomDecoder(),
concurrentDecoderServiceName: CUSTOM_DECODER_SERVICE_TYPE,
storageLevelOffset: -1
});
map.addDataSource(customDatasource);
// end:custom_datasource_example_custom_data_source_create.ts
// Also visualize the tile borders:
const debugDataSource = new DebugTileDataSource(webMercatorTilingScheme, "debug", 20);
map.addDataSource(debugDataSource);
return map;
}
year: new Date().getFullYear(),
label: "HERE",
link: "https://legal.here.com/terms"
};
const copyrights: CopyrightInfo[] = [hereCopyrightInfo];
const omvDataSource = new OmvDataSource({
baseUrl: "https://xyz.api.here.com/tiles/herebase.02",
apiFormat: APIFormat.XYZOMV,
styleSetName: "tilezen",
maxZoomLevel: 17,
authenticationCode: accessToken,
copyrightInfo: copyrights
});
const debugTileDataSource = new DebugTileDataSource(webMercatorTilingScheme);
this.mapView.addDataSource(omvDataSource);
this.mapView.addDataSource(debugTileDataSource);
this.initializeDebugView();
}