Google maps is a marvelous app.
I try to program a prototype of it on pys60
http://bigbold.com/snippets/posts/show/458
There I only show the default map, not the satellite images.
Retrieving a different mode isn't that difficult.
I read the info from here
http://intepid.com/2005-07-17/21.50/
Then I begin comparing the 2 tile types of the same area
(around California)
http://mt.google.com/mt?v=w2.5&x=20&y=49&zoom=10 (map)
http://kh.google.com/kh?v=3&t=tqtsqrqt (satellite)
Here's the conversion routine between x,y,zoom and quadtree
1
2 def quadtree(x,y, zoom):
3 out = []
4 m = {(0,0):'q', (0,1):'t', (1,0):'r', (1,1):'s'}
5 for i in range(17-zoom):
6 x, rx = divmod(x, 2)
7 y, ry = divmod(y, 2)
8 out.insert(0, m[(rx,ry)])
9 return 't' + ''.join(out)
Then to convert back
1
2 def xyzoom(quad):
3 x, y, z = 0, 0, 17
4 m = {'q':(0,0), 't':(0,1), 'r':(1,0), 's':(1,1)}
5 for c in quad[1:]:
6 x = x*2 + m[c][0]
7 y = y*2 + m[c][1]
8 z -= 1
9 return x, y, z
Using them is simple
1
2 >>> quadtree(20,49,10)
3 'tqtsqrqt'
4 >>> xyzoom('tqtsqrqt')
5 (20, 49, 10)
6 >>> sat_url = 'http://kh.google.com/kh?v=3&t=' + quadtree(20,49,10)