Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overlay view not rendering correctly #99

Closed
wants to merge 1 commit into from
Closed

Fix overlay view not rendering correctly #99

wants to merge 1 commit into from

Conversation

simon-engledew
Copy link

Hi!

I recently upgraded to the latest version of react-google-maps and my OverlayViews stopped working. They would mysteriously cluster at the origin of the map:

image

After adding the position property to the whitelist of component properties (although admittedly in the post-babel distribution code in my node_modules folder) they spring into life again:

image

This was made a little trickier to debug because the _getPixelPosition method doesn't complain if it cannot get a projection or a position for the OverlayView. It would probably be worth taking this change one step further and adding a warning if the if (projection && position) { condition does not match.

Cheers,
~ Si

Pass the position attribute through to the OverlayViewCreator.

Without this, overlay items display at the origin of the map until an event is processed.
@tomchentw
Copy link
Owner

Thanks a bunch! This fixes the issue from
2c0dc02#commitcomment-12587801

@tomchentw tomchentw closed this in 1fc968a Aug 18, 2015
@simon-engledew
Copy link
Author

You are very welcome!

I quite like your commit message format. ^_^

@tomchentw
Copy link
Owner

Ha, it's called conventional-changelog. You can find more details here:
https://github.com/ajoslin/conventional-changelog

@simon-engledew
Copy link
Author

Cheers 👯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants