From 8e77d70c272ac243c5d53f3dd6c02f508104226f Mon Sep 17 00:00:00 2001 From: Martin Schuhfuss Date: Fri, 10 May 2024 22:28:09 +0200 Subject: [PATCH] fix(map): set other container position to relative (#357) The change in #356 did the right thing, but added the position:relative to the wrong element. --- src/components/map/index.tsx | 1 + src/components/map/use-map-instance.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/map/index.tsx b/src/components/map/index.tsx index aee8955..a029d52 100644 --- a/src/components/map/index.tsx +++ b/src/components/map/index.tsx @@ -169,6 +169,7 @@ export const Map = (props: PropsWithChildren) => { () => ({ width: '100%', height: '100%', + position: 'relative', // when using deckgl, the map should be sent to the back zIndex: isDeckGlControlled ? -1 : 0, diff --git a/src/components/map/use-map-instance.ts b/src/components/map/use-map-instance.ts index 8e097a9..ffe8795 100644 --- a/src/components/map/use-map-instance.ts +++ b/src/components/map/use-map-instance.ts @@ -132,7 +132,6 @@ export function useMapInstance( } else { mapDiv = document.createElement('div'); mapDiv.style.height = '100%'; - mapDiv.style.position = 'relative'; container.appendChild(mapDiv); map = new google.maps.Map(mapDiv, mapOptions); }