We are using harp.gl in an ng angular application, but are having trouble connecting to data sources in the same way that worked in our yarn demo.
We create the datasource as:
const dataSource = new OmvDataSource({
baseUrl: "https://vector.hereapi.com/v2/vectortiles/base/mc",
apiFormat: APIFormat.XYZOMV,
styleSetName: "tilezen",
authenticationCode: apikey,
authenticationMethod: {
method: AuthenticationMethod.QueryString,
name: "apikey"
}
});
and create a MapView as:
const mapView = new MapView({
canvas: mapCanvas,
theme: "assets/resources/berlin_tilezen_base.json",
// note, this URL may vary depending on configuration of webpack
// for this example, it is assumed that app is server from project root
decoderUrl: "harp-gl-decoders.bundle.js"
// note, this URL may vary depending on configuration of webpack
// for this example, it is assumed that webpack emits bundles to project root
});
and add the data source thus:
mapView.addDataSource(dataSource);
and see this at the console:
[WDS] App updated. Reloading...
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
MapView: Failed to connect to datasource anonymous-datasource#1: Error during worker initialization
[WDS] Live Reloading enabled.
and this at the debug console of the webpage:
:4200/decoder.bundle.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ConsoleChannel.js:15 MapView: Failed to connect to datasource anonymous-datasource#1: Error during worker initialization
I have spent many hours grasping at straws and would accept any help.