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

GoogleMaps: need better view to span and zoom convertion #27

Closed
nleush opened this issue Sep 27, 2013 · 1 comment
Closed

GoogleMaps: need better view to span and zoom convertion #27

nleush opened this issue Sep 27, 2013 · 1 comment

Comments

@nleush
Copy link
Member

nleush commented Sep 27, 2013

Someone who knows about longitude/latitude calculations could convert the long+lat+view diameter (I think in meters) of the new Google maps into long+lat+span in degrees of the embed code and long+lat+zoom for the given resolution of the thumbnail. I don't feel like learning this kind of math so I just did a quick conversion of the diameter to a zoom value (the embeds accept long+lat+spn or long+lat+zoom). However, the zoom value is probably only correct under a certain window/iframe size (it is correct for me for maximized browser windows; my screen resolution is 1920x1080). So the embed shows the correct coordinates, but they only show the correct area if the original URL already had a spn query parameter. The way I did it the thumbnail will probably never show the exactly correct area, because it needs a zoom value (doesn't accept spn). I would need to convert the spn to a zoom for the given width/height. If the original URL has no zoom (only a spn) the thumb currently has zoom=0 (completely zoomed out). You get such URLs if you go to a new Google Maps URL but you don't have opted in to the new Google Maps GUI.

So if someone who knows this sort of maths would take a look at it, the generated embed code and thumbnails could be much better (show precisely what the user viewed in Google Maps before).

@iparamonau
Copy link
Member

Done in the new google maps plugin

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

No branches or pull requests

2 participants