Understanding Google Map server (Update)

EDIT:
url have been updated as old one did not work anymore

Here is an explanation on how google map server works, it took me some time to undertand it, when i finnaly found that it is really simple!

google map server http://kh1.google.fr/ http://kh0.google.com/kh or http://kh1.google.com/ http://kh0.google.fr/ or etc… is a quadtree of 256*256 jpg:

NB: I play by computing and approximation of number of jpg handled by google maps server about 24^19 jpg(256256) or 2^39!!

Lets look at the following url:
http://kh1.google.fr/kh?v=20&t=tq
new URL

http://kh0.google.com/kh?v=3&t=tq

explanation of parameter:
v : length of t parameter can be higher but cannot be lesser than t parameter lenght (so you can let it to 20)
t : jpg location in the quad tree begining with “t”

The above url t parameter means:
first jpg of the first tree level “q”
second jpg of the first tree level “r”
third jpg of the first tree level “s”
fourth jpg of the first tree level “t”

how it is divided:
QR
TS

each level is than subdivided in 4 same way:
http://kh1.google.fr/kh?v=20&t=tqq
http://kh0.google.com/kh?v=3&t=tqq
qq means first sub jpg of the first jpg

you may better understand with this picture :

So to have the first quarter of the earth:
http://kh1.google.fr/kh?v=20&t=tq
http://kh0.google.com/kh?v=3&t=tq

http://kh0.google.com/kh?v=3&t=tq

and the first quarter of the first quarter:
http://kh1.google.fr/kh?v=20&t=tqq
http://kh0.google.com/kh?v=3&t=tqq

http://kh0.google.com/kh?v=3&t=tqq

it is easy to convert latitude and longitude to quarter you can see a demo online there:
http://demo.dzzd.net/GMAP/

have fun!

EDIT:
If you are interrested in the demo source code just right click on your browser and select view source there is no outside files, the whole source including jscript is in the the html source code.

s and t are the wrong way round on the top level of your diagram.

Neat stuff tho! :slight_smile:

Kev

oups… fixed, thanks

Nice work Bruno!

Time to start using this for streaming LOD textures for our 3D Earth demo dont you think? :wink:

[quote]Time to start using this for streaming LOD textures for our 3D Earth demo dont you think?
[/quote]
inded it could be really cool a google earth lite edition working with JVM 1.1.

but dont really know if those image can be used , google show images in its search engine image section so i guess if they do (showing image from other servers) I thing we should be able to do the same and use image from google map server ?

anyways it would really cool

ps.: I forgot to mention this url http://kh1.google.com/kh?v=20&t=t

wich show the whole earth map (zoom=0)

http://kh1.google.com/kh?v=20&t=t

This is great! Hours of fun :slight_smile:
BTW Is there a simple system for converting longitute/latitude to ‘http://kh1.google.com/kh?v=20&’ format?

yup just look at the html source code of the given demo link in the first post, all the jscript is inside, it is easily convertible to any other language.

Edit:

this one, right click qnd select “view html source code”
http://demo.dzzd.net/GMAP/

seems that something was changed google side, so I have update this post with the new working URL (old one did not work anymore), online sample has also been updated : http://demo.dzzd.net/GMAP/ )

have fun