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

Cannot select points in Google Maps Adapter when view is rotated/tilted #76

Closed
anderswi opened this issue Aug 24, 2023 · 4 comments · Fixed by #81
Closed

Cannot select points in Google Maps Adapter when view is rotated/tilted #76

anderswi opened this issue Aug 24, 2023 · 4 comments · Fixed by #81
Labels
Google Maps JS API Related to the Google Maps Adapter

Comments

@anderswi
Copy link
Contributor

When rotating/tilting a (vector) map using the Google Maps adapter, selection breaks. It seems like project and unproject in google-maps-adapter does not take rotation/tilting into account.

I did a quick test with replacing the project/unproject code with projection.fromLatLngToContainerPixel and projection.fromContainerPixelToLatLng which seems to work better, but I'm unsure if there's reasons not to use those instead of the custom projection code?

@JamesLMilner
Copy link
Owner

Hey @anderswi - thanks for raising this. I haven't had a chance to experiment with Terra Draw + vector Google Maps. I can see why this would be an issue though.

I'd imagine that your observation about rotation and tilt not being take into account is correct. Let me see if I can find some time to investigate.

I think this is partially related to #23 as when you move to 3D rendering these types of issues are crop up.

@anderswi
Copy link
Contributor Author

anderswi commented Sep 6, 2023

Hi James,

I took a stab at fixing this, hope you find it useful. :)

@JamesLMilner
Copy link
Owner

Hey @anderswi thanks for this! Appreciate your input. Unfortunately I am on holiday until the 18th of September so won't be able to properly review this until then. When I'm back I will get straight on it.

@anderswi
Copy link
Contributor Author

anderswi commented Sep 7, 2023

No worries, enjoy your holiday!

@JamesLMilner JamesLMilner added the Google Maps JS API Related to the Google Maps Adapter label Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Google Maps JS API Related to the Google Maps Adapter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants