-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when removing a layer #278
Comments
Hey @gillioa, The above code isn't really helpful, could you reproduce the bug using this boilerplate: https://github.com/alex3165/react-mapbox-gl-debug. That would be very helpful! thanks |
I get the same behavior in my own app. After a call to I merged @gillioa's into the debug example here. I added a timeout to clear
|
Here is the underlying bug: mapbox/mapbox-gl-js#5145. The fix should be in the next mapbox-gl-js release (0.40.0). |
...I verified the fix in react-mapbox-gl v2.6.0. |
I still have this issue. Added a raster layer like in the docs
but if I then want to remove it by return nothing to my map I get this error constantly: Works fine when I add and remove GeoJsonLayers but with the Layers it breaks |
Hey @neuraxis could you reproduce the issue with webpackbin ? |
no problem: look at dev tools to see the error |
Did you investigate the error in the above comment? |
Hi,
Sometimes, I got this error when I try to remove a layer from my map.
Here is my code :
On my page, I have a menu to select and unselect locations and it's modifying my locations array.
When I come on my page for the first time, my locations array is empty but I don't get any error. When I select a locations it's displaying a layer correctly on my map, but when I unselect some locations and remove it from my array, mapbox-gl.js is throwing this error. It seems to happen a bit randomly.
Thanks for your help.
The text was updated successfully, but these errors were encountered: