Skip to content

[BUG] - Popover not sticking to div element on Google Maps (might not be bug) #88

@asdutoit

Description

@asdutoit

Describe the bug
Hi Guys,
I am using Nextjs 12 with Google Maps. I am wondering if I can use the React-laag Popover element with a map marker.

I have managed to create the marker and on invoking an onClick function, the popover appears. But when panning the map, the popover element does not stay with the marker.
It is very possible that this is not a bug but merely the incorrect application of this utility.

Working Example is available at Codesandbox: Click Here

Expected behaviour
The Popover element should stick to the div element (for example the marker or button) when panning the maps.

Screenshots
Screenshot 2022-06-30 at 12 36 59
Screenshot 2022-06-30 at 12 37 05 (2)

  • Nextjs 12.2.0
  • React 18.3.0

Additional context
I have noticed weird behaviour with Markers and OverlayViews on React version 18. Not sure if it could be related.
To experience this behaviour, click on the map marker with-OverlayView and pan the map.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions