Forums

Zoom levels change after you submit?

Pages: 1
kjfitz
10/12/05 08:50 PM

Edit Reply Quote Quick Reply
Do you ever notice that sometimes when you submit a map with a URL at maximum zoom and later when you launch the URL for the map it is zoomed to a different level?

The URL contains a "span" argument that is totally dependant on the size of Google Maps (now Google Local by the way) in your browser.

In my browser (I use Firefox) here is the URL I get when I click "link to this page" while I give Google Local the maximum space in the browser by closing all sidebars, status bars, and maximizing the browser.

http://maps.google.com/maps?q=Sao+Paulo,+Brazil&ll=-23.489462,-46.807326&spn=0.006674,0.012883&t=k&hl=en

If I make the map area of the same URL as small as a postage stamp by shrinking my window down and then click "link to this page" I get this different URL:

http://maps.google.com/maps?q=Sao+Paulo,+Brazil&ll=-23.489462,-46.807326&spn=0.001496,0.002120&t=k&hl=en

Note that the "spn" arguments are smaller values the smaller the map area in your browser gets.

Now what does this mean to you?

If you create your URL in a browser that has a large area to display a map and then later you or someone else looks at that same URL on a computer with a smaller screen size that has a smaller window the magnification will pop down a level or two or three in order to fit the whole original image into their smaller window.

So... If you are focusing on a particular detail of a map, say a building in the center, then you want everyone who views the map to view it a maximum magnification/zoom.

So now that we know how the "spn" generally works, we can hack it to always show max zoom by replacing the "spn" values with a very small value: 0.000001,0.000001

Our new URL will be:

http://maps.google.com/maps?q=Sao+Paulo,+Brazil&ll=-23.489462,-46.807326&spn=0.000001,0.000001&t=k&hl=en

And now no matter how small you make your window the map will remain focused at maximum zoom.
kjfitz
Virtual Globetrotting Moderator
nic
10/12/05 10:17 PM

Edit Reply Quote Quick Reply
Good post Kevin, thanks!
Pages: 1
Extra information
0 registered and 59 anonymous users are browsing this forum.

Moderator:  TexasAndroid, kjfitz, AlbinoFlea, Hinkkanen, Pdunn, Parabellum, dda, mlc1us, milwhcky, gordonhigh, Xeba73, tallturtle82, Fab, Matheus_ 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Topic views: 3063