Using the javascript API in a react / nextjs app, we have intermittent issues with the "navigation" basemap labels and icons.
These issues started occurring for us after switching to the basemap styles service ( "streets" -> "arcgis/navigation")
The sequence is the map loads, we initially see the arcgis/navigation basemap with the labels blurred. Then, the font file is downloaded, and the labels (sometimes - see interceptor workaround below) draw correctly.
These issues are intermittent - sometimes they do not happen, sometimes they happen on every load. Sometimes they occur on certain pages of the app, but not others (despite the esri logic being identical)
Every tested version after 4.28.10 including next has these issues. They occur in both chrome and firefox.
Adding an http interceptor to prevent the fonts from being cached seems to fix the label issues most of the time, but not all.
This causes the fonts to need to be downloaded every time. To me this indicates something is broken with timing.
This unfortunately does not fix the black box city location icons. We have not found a way to recover from this issue, or even determine via code the issue occurs.
There is nothing notable about how the map view is constructed (code below is wrapped in useEffect)
This would have been a support ticket, except it is not reproducible with vanilla JS.
This is a similar post:
Can anyone give any tips for getting around this issue?
I finally made some progress here... I was not able to reproduce in a fresh app, only our very large, multi-team app
Steps:
pin the arcgis/core version to =4.28.10.
deleted package.lock file (Don't do this unless you want to enter dependency **bleep** and test every feature of your app)
run npm install.
With a fresh set of dependencies and dependencies, for that specific version, the issue seems to resolve.
We are experiencing this issue as well. We can't consistently reproduce it as it seems to be a timing issue within the Esri library?
details:
"@arcgis/core": "^4.31.6",
"@esri/calcite-components": "^2.10.1",
"@esri/calcite-components-react": "^2.13.2",
"@esri/calcite-ui-icons": "^3.29.0",
deleting the package lock file isn't a reasonable solution for us.
We tried by setting the language at the very start of the application through
<script>
// Set the locale before the SDK loads
esriConfig = {
locale: "en-US"
};
</script>
It would be nice if Esri could respond or if other users that are experiencing this issue could let us and Esri know. thanks!