Technology
HOWTO: use latitude and longitude with Google Maps

gmaplatlon_20070802.jpg

Whether you want to quickly add a waypoint to your GPS, or view a map of a known location, it can often be convenient to use real latitude and longitude values with Google Maps instead of dealing with street addresses.

Rerieving a map for a lat/lon value is simple enough with Google Maps. You can simply enter the decimal latitude and longitude into the search form instead of a street address.

However, if you’re viewing a map and you want to retrieve the lat/lon location, there unfortunately isn’t a convenient “get latitude and longitude” button. Google Maps deals with latitude and longitude locations internally, though, so with this little snippet of javascript, you can easily get the job done:

javascript:void(prompt('',gApplication.getMap().getCenter())

This will return the coordinates of the map’s center point. You might want to double-click a position on the map before running the above code. Doing so will reposition that point to the center of the map automatically.

Get Latitude and Longitude values from Google Maps – [via] Link

14 thoughts on “HOWTO: use latitude and longitude with Google Maps

  1. An easier method that doesn’t require javascript (though may be [u]slightly[/u] less accurate) is to simply right-click on the area of the map you’re interested in and click the “Directions to here” option. If you don’t have a starting point already on the map, it will fill in the endpoint above with the location followed by the lat/lon (i.e., Anywhere,TX@xx.xxxxxx, yy.yyyyyy).

  2. Thanks ltt. Regarding the 35W Mississippi bridge — I live in Minneapolis and was seeing if Google’s map had been updated. It seemed like an appropriate and topical location which doesn’t have a street address, but that a person might want to locate.

    For those who didn’t hear about this, the bridge completely collapsed during a bumper-to-bumper traffic jam Wednesday and, thankfully, the vast majority of drivers managed to walk away after plummeting 70 feet into the river.

    Here’s a good photo gallery if you’re insterested – Link

  3. @ neilbert: I was fully aware of the bridge collapse when I posted my previous comment. It was no joke. Thats why I asked. I live near the Twin Cities, and lived in Minneapolis for a short time years ago. The tragedy is close to my heart as well. I was simply wondering why there was no other explanation as to why that location was chosen.

    @ jason_striegel: Thanks for clearing it up though.

  4. …also just click on the “link to this page” the Lat and Long show up in the link… in several different formats.

Comments are closed.

Tagged