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
{{ message }}
Repository navigation
InfoWindows are unable to overflow out of the GoogleMap component #744
When using the InfoWindow component, hovering over markers or advanced markers can leave the info window pop up to be partially cut off or all of the way hidden depending on the pan/zoom of the map. There is no way that I have found to custom style the markers or info window component to allow the info window to overflow/pop out of the GoolgleMap component. The z-index prop does not seem to effect his behavior either.
This is working as intended. The Map is the outer boundary for anything happening within the map.
Besides this being implemented this way in the Google Maps API (so the only thing we could do would be to hack our way around it), I don't see an alternative that wouldn't cause problems for most use-cases.
changed the title [-][Bug] InfoWindows are unable to overflow out of the GoogleMap component[/-][+]InfoWindows are unable to overflow out of the GoogleMap component[/+]on Apr 16, 2025
You can't use the built-in components to do this, since all of them will render within the DOM context of the map (and the main container that has overflow:hidden, iirc).
Essentially, you could use the google.maps.OverlayView class to get screen coordinates for a given geographic location, then use that to position your own html elements within the page.
Activity
usefulthink commentedon Apr 16, 2025
This is working as intended. The Map is the outer boundary for anything happening within the map.
Besides this being implemented this way in the Google Maps API (so the only thing we could do would be to hack our way around it), I don't see an alternative that wouldn't cause problems for most use-cases.
[-][Bug] InfoWindows are unable to overflow out of the GoogleMap component[/-][+]InfoWindows are unable to overflow out of the GoogleMap component[/+]chesaman12 commentedon Apr 16, 2025
Do you have any idea's how I could accomplish this with react-dom createPortal? When I try to use it, it seems to be ignored.
usefulthink commentedon Apr 17, 2025
You can't use the built-in components to do this, since all of them will render within the DOM context of the map (and the main container that has
overflow:hidden, iirc).Essentially, you could use the
google.maps.OverlayViewclass to get screen coordinates for a given geographic location, then use that to position your own html elements within the page.