I have a simple web map with 3 layers. Two of them use feature reduction. I am using ArcGIS Map SDK for JavaScript 4.27, TypeScript and Angular 16.
Web map works well with Edge and Chrome but hangs in Firefox. Firefox gets unresponsive and two of the layers are not shown (those with feature reduction).
I'll get an error in the Web Developer Console:
The JavaScript file is located here:
https://js.arcgis.com/4.27/@arcgis/core/assets/esri/core/workers/chunks/3ad56b5f273e2d911dbd.js
This error does not occur when using Edge and Chrome.
Solved! Go to Solution.
Unfortunately providing a MWE was not possible this time.
However, I found the culprits...
const RENDERER = new SimpleRenderer({
symbol: new PictureMarkerSymbol({
// url: 'assets/map-symbols/gender-neutral.svg', // not working
url: 'assets/map-symbols/gender-neutral.png', // working
width: '34px',
height: '34px',
xoffset: '-18px',
yoffset: '-3px',
})
});
After changing the URL to point to a PNG file instead of a SVG file, I do not have any issues anymore, and neither do I get the JS error.
I am also using a custom base map (a Vector Tile Layer) stored on ArcGIS Online.
@Thomas_Z2please provide a simple, focused sample application that reproduces the error. We recommend using vanilla JS (e.g. codepen demoing the webmap), stackblitz or github repo.
For example, here is an Angular example that provides a good starting point: https://github.com/Esri/jsapi-resources/tree/main/esm-samples/jsapi-angular-cli.
Unfortunately providing a MWE was not possible this time.
However, I found the culprits...
const RENDERER = new SimpleRenderer({
symbol: new PictureMarkerSymbol({
// url: 'assets/map-symbols/gender-neutral.svg', // not working
url: 'assets/map-symbols/gender-neutral.png', // working
width: '34px',
height: '34px',
xoffset: '-18px',
yoffset: '-3px',
})
});
After changing the URL to point to a PNG file instead of a SVG file, I do not have any issues anymore, and neither do I get the JS error.