[html] Url to a google maps page to show a pin given a latitude / longitude?

Is there some url I can construct with a latitude,longitude pair that will lead me directly to a google maps page to visualize that location?

For example, the following pseudocode:

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>';

Something like that?

Thanks

This question is related to html google-maps

The answer is


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