You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Layer components (such as MAPCMunicipality) need data in array form in order to correctly create the choropleth. Our usual way of doing this in React is as follows:
Where data is then passed to the layer. However, this causes the map to disappear and the following error to appear in the console (browser agnostic): WebGL context was lost (mapbox-gl.js 35). This doesn't occur when console.loging the response from .then, and it also doesn't occur when setting state outside the call to d3.csv (but inside useEffect).
The text was updated successfully, but these errors were encountered:
Layer components (such as MAPCMunicipality) need data in array form in order to correctly create the choropleth. Our usual way of doing this in React is as follows:
Where
data
is then passed to the layer. However, this causes the map to disappear and the following error to appear in the console (browser agnostic):WebGL context was lost (mapbox-gl.js 35)
. This doesn't occur whenconsole.log
ing the response from.then
, and it also doesn't occur when setting state outside the call tod3.csv
(but insideuseEffect
).The text was updated successfully, but these errors were encountered: