Pages

Friday, March 09, 2012

Google hybrid maps

I always admired how Google married the satellite imagery with regular map data or, rather, a layer of useful information on top of the satellite image of the world. The interesting thing is that other map providers did not do it in the same way, although the result was quite similar in some cases. But doing it in this way there was no need to have different data sources. It was simple to view only satellite images without overlay, or with it.
The information is served from the same servers (there are 4 apparently - mt0 to mt3) and the difference is in the first parameter.

Map overlay:
http://mt3.google.com/vt/lyrs=h@145&hl=en&x=257&y=171&z=9
The pattern:
http://mt3.google.com/vt/lyrs=h@145&hl=en&x={1}&y={2}&z={0}

Map data:
http://mt1.google.com/mt?n=404&v=w2.12&x=130&y=93&zoom=9 

The pattern is "http://mt3.google.com/vt/v=w2.97&x={1}&y={2}&z={0}"

Satellite data:
http://kh0.google.com/kh?n=404&v=8&t=trtqtt
The pattern:
http://khm1.google.com/kh/v=59&x={1}&y={2}&z={0}


For more details on how to embed maps, see here:
http://code.google.com/apis/maps/index.html

No comments: