Closed chunlampang closed 2 months ago
It seems like the issue is with mapbox-gl@3.5.2
. I found that no errors occur with version 3.5.1 of mapbox-gl. I've also reported the bug to the mapbox-gl
library.
https://github.com/mapbox/mapbox-gl-js/issues/13239
Thanks for bringing this to our attention. I provided a reproduction on the upstream issue thread.
FYI same error occurs with previous major deck.gl version. That is
@dekc this is a Mapbox bug, not deck.gl's. It's been acknowledged by Mapbox.
In mapbox-gl 3.6.0, they solved the bug, but created another error.
TypeError: Cannot read properties of undefined (reading 'setProps')
Follwoing up on @chunlampang, specifically the issue is now caused by this section of code:
function DeckGLOverlay(props: DeckProps) {
const overlay = useControl<MapboxOverlay>(() => new MapboxOverlay(props));
overlay.setProps(props);
return null;
}
which is found here in the MapboxOverlay section of the docs. Issue is present in mapbox-gl: 3.6.0
In mapbox-gl 3.6.0, they solved the bug, but created another error.
TypeError: Cannot read properties of undefined (reading 'setProps')
Someone opened another issue for this case. https://github.com/visgl/deck.gl/issues/9086
Description
Any layer inside
MapboxOverlay
will throwError: Layer with id "layer-id" already exists on this map
wheninterleaved
is set totrue
.Flavors
Expected Behavior
No error
Steps to Reproduce
Environment
deck.gl@9.0.24 mapbox-gl@3.5.2
Logs
No response