Maplibre popup rendering below the map #9132
-
Hi, I'm trying to render a react-map-gl/maplibre popup in my Deck/MapLibre/Typescript/React app, but it seems to be rendering way below the map. Is it something to do with the z-index? Many thanks in advance. :)
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I've also tried rendering the popup outside the map component below using the GLContext as mentioned in this post
|
Beta Was this translation helpful? Give feedback.
-
When you render Map as a child of DeckGL, it is placed under the deck canvas, along with its children. This has to do with hierarchy, not z index. I encourage you to read https://deck.gl/docs/developer-guide/base-maps/using-with-mapbox#integration-modes to understand your options. Both |
Beta Was this translation helpful? Give feedback.
-
Many thanks I've managed to get it working using the interleaved mode you suggested. I also forgot to import the correct css i.e.
|
Beta Was this translation helpful? Give feedback.
When you render Map as a child of DeckGL, it is placed under the deck canvas, along with its children. This has to do with hierarchy, not z index.
I encourage you to read https://deck.gl/docs/developer-guide/base-maps/using-with-mapbox#integration-modes to understand your options. Both
interleaved
andoverlaid
with MapboxOverlay will allow you to use thePopup
control.