Lat/Long Bookmarklet for Google Maps

Not your typical distance education-related posting, except you might want to know where your students are – yeah, that’s the connection!  😉

Last week my family started geocaching – great fun and I highly recommend it if you don’t live deep in a big city.  Even then it can be done, but it’s different.  Anyhoo, I happened to come across a post at Tech Recipes that shows a little snip of javascript that you can use while viewing Google Maps to obtain the latitude and longitude of that particular location.  They suggested,

When the location you want is in the center of the map, copy and paste this code into the location bar of your browser and press enter:

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

A little dialog box will pop up displaying the coordinates which can be copied and pasted for use elsewhere. This code can be bookmarked and then used in the future by selecting the bookmark.

But you know there’s no dang way anyone’s going to remember that, so why not make it a bookmarklet?  After I whipped one up, then I checked to see if it had already been done, and found this version, but it doesn’t allow you to easily copy the coordinates to another application, so I think mine’s better. 🙂

Drag this to your bookmarks toolbar in Firefox, then find a location in Google Maps, hit the bookmarklet, and voila!  There’s your latitude and longitude ready for copying into any application.

GMaps Lat/Long  <– Bookmarklet

Anyone want to test/modify for other browsers?


Comments

4 Responses to “Lat/Long Bookmarklet for Google Maps”

  1. Thanks so much for this lat/long. I’m an ethnographer and have found this particularly useful in my fieldwork.

  2. I had no trouble using this in IE6. I pasted the code into the address bar while on a google map. After pressing enter it displayed the lat/long. I then saved it into favorites but it didn’t save the javascript in the address bar, it saved maps.google.com. I then edited the favorite and pasted the javascript into the URL field and now it works just like a bookmarklet in firefox.

  3. ashlyn_a@hotmail,com Avatar
    ashlyn_a@hotmail,com

    Thank you so much! I’m going to make a Christmas gift for my boyfriend with the location of his cabin on a sign! You saved me so much time and aggrivation!!!!

  4. Doesn’t work anymore.