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

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?


Solution #1:

You should be able to do something like this:


Some more info on the query parameters available at this location

Here’s another link to an SO thread

Respondent: dawebber

Solution #2:

From my notes:


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

Respondent: Edward Falk

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.