JustFly1984 / react-google-maps-api

React Google Maps API
MIT License
1.76k stars 426 forks source link

OverlayView is not positioned correctly #3209

Open AndriyHromyak opened 1 year ago

AndriyHromyak commented 1 year ago

Your Environment

os: mac

node --version - 18.4.0

react version - 18.2.0

webpack version - 5

How does it behave?

When implementing OverlayView and provided all needed props, it is not calling "getPixelPositionOffset" on first render only if you move map a bit it is being called

How should it behave correctly?

"getPixelPositionOffset" - should be called on first render to position OverlayView correctly

timbotimbo commented 1 year ago

Replacing OverlayView with OverlayViewF fixed the issue for me. Apparently it is the same component implemented using react hooks,

man-trackunit commented 8 months ago

@timbotimbo you are my hero. This has been driving me INSANE