6

I need to write chrome extension which references on new version of Google Maps site.

BUT, in new google maps preview i can not give link becouse i can't calculate new zoom parameter.

For example, URL new google maps: https://www.google.com/maps/preview#!data=!1m4!1m3!1d4112402!2d-62.7728736!3d44.829016

new zoom parameter are very strange:

zoom 23 http://google.com/maps/preview#!data=!1m4!1m3!1d 1145       !2d29.6765085!3d59.868445
...
zoom 12 http://google.com/maps/preview#!data=!1m4!1m3!1d 77910      !2d29.6765085!3d59.868445
zoom 11 http://google.com/maps/preview#!data=!1m4!1m3!1d 155852     !2d29.6765085!3d59.868445
zoom 10 http://google.com/maps/preview#!data=!1m4!1m3!1d 311710     !2d29.6765085!3d59.868445
zoom 9  http://google.com/maps/preview#!data=!1m4!1m3!1d 623333     !2d29.568544!3d59.8698115
zoom 8  http://google.com/maps/preview#!data=!1m4!1m3!1d 1247028    !2d29.568544!3d59.8698115
zoom 7  http://google.com/maps/preview#!data=!1m4!1m3!1d 2493322    !2d29.568544!3d59.8698115
zoom 6  http://google.com/maps/preview#!data=!1m4!1m3!1d 4987951    !2d29.568544!3d59.8698115
zoom 5  http://google.com/maps/preview#!data=!1m4!1m3!1d 9979726    !2d29.568544!3d59.8698115
zoom 4  http://google.com/maps/preview#!data=!1m4!1m3!1d 19959453   !2d29.568544!3d59.8698115
zoom 3  http://google.com/maps/preview#!data=!1m4!1m3!1d 40027823   !2d29.568544!3d52.0636483
zoom 2  http://google.com/maps/preview#!data=!1m4!1m3!1d 80266577   !2d29.568544!3d48.7705008
zoom 1  http://google.com/maps/preview#!data=!1m4!1m3!1d 100000000  !2d29.568544!3d47.3841015
     ↑                                                       ↑           ↑            ↑     
old google                                      new zoom parameter      LAT         LONG
maps zoom                                       on Google Maps Preview
parameter                                       depends on coordinates
intuitive and easy                              how to calculate it?

This parameter depends on coordinates!

How can i generate link on new google maps with this zoom, if i know old zoom parameter (from 1 to 23)?

I think I need a new weird setting for a new function Globe... but i don't know how to compute this... google search don't know answer

If zoom parameter is bad - maps redirect to home location.

enter image description here

Taylan Aydinli
  • 4,333
  • 15
  • 39
  • 33
user16609
  • 121
  • 1
  • 6
  • There's some more info which seems to work on a similar question I asked here: http://stackoverflow.com/questions/22939725/why-has-google-maps-q-parameter-stopped-working – Jon Cage Apr 28 '14 at 16:10

1 Answers1

6

How about using the alternative @ syntax when linking to the maps?

Template:

https://www.google.co.uk/maps/place/@{LATITUDE},{LONGITUDE},{ZOOM}z

Example:

https://www.google.co.uk/maps/place/@29.6765085,59.868445,12z https://www.google.co.uk/maps/place/@29.6765085,59.868445,11z

aemkei
  • 11,076
  • 8
  • 37
  • 29
  • In the current version of Google Maps, the `{ZOOM}z` parameter is becoming a `{OBS}m` parameter, which seems to be the distance of the observer/view point from the surface. Try using a parameter bigger than `10000000m` :-) ) – Marvin Dec 10 '14 at 16:16
  • what about sattellite view? There is no zoom parameter. Only "meters" instead zoom https://www.google.co.uk/maps/@29.6765085,59.868445,25772m/data=!3m1!1e3 – user16609 Nov 13 '16 at 08:05