指向谷歌地图页面的 URL,以显示给定经度/纬度的图钉?

是否有一些网址,我可以建立一个纬度,经度对,将导致我直接到谷歌地图页面,以可视化的位置?

例如,下面的伪代码:

var lat = 43.23;
var lng = 114.08;


var url = 'http://google.com/maps/bylatlng?lat=' + lat + '&lng=' + lng';


print 'click here to see this location in google maps!: <a href="' + url + '">go</a>';

差不多吧?

谢谢

160012 次浏览

You should be able to do something like this:

http://maps.google.com/maps?q=24.197611,120.780512

Some more info on the query parameters available at this location

Here's another link to an SO thread

From my notes:

http://maps.google.com/maps?q=37.4185N+122.08774W+(label)&ll=37.419731,-122.088715&spn=0.004250,0.011579&t=h&iwloc=A&hl=en

Which parses like this:

    q=latN+lonW+(label)     location of teardrop


t=k             keyhole (satelite map)
t=h             hybrid


ll=lat,-lon     center of map
spn=w.w,h.h     span of map, degrees

iwloc has something to do with the info window. hl is obviously language.

See also: http://www.seomoz.org/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters