<%= NewRelic::Agent.browser_timing_header rescue "" %>

David van Geest

Software, Life, and Stuff I Couldn't Find on the Internet

Using Google Maps to find a latitude and longitude

| Comments

I've been working with the Google Maps API recently for another website I'm working on, and I frequently find myself creating new GMarkers from a latitude and longitude pair. So far, the best way I've found of getting a location's exact latitude and longitude is this:

  • Go to maps.google.com and find the location
  • Right click at your desired location on the map, and select "Center map here"
  • In the top right hand corner of the map, click the "Link" link
  • Copy-paste the resultant URL elsewhere. In the middle of the URL is a parameter similar to this: ll=42.963615,-85.664263, that's your latitude and longitude pair