We've integrated harp.gl into our ng Angular application, but we're encountering issues when trying to connect to data sources that previously worked in our yarn demo.
The datasource is created as follows:
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 the MapView is created like this:
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
});
then the data source is added using the following code:
mapView.addDataSource(dataSource);
This results in the following messages being displayed on 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 the webpage's debug console shows:
: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've spent countless hours troubleshooting and am open to any assistance.