DISQUS

Tech-Recipes: Get Latitude and Longitude values from Google Maps | Google | Tech-Recipes

  • Anonymous · 2 years ago
    :( Doesn't work for me ... Firefox 2.0 ...
  • costroff · 1 year ago
    I have been looking for this forever! Thank you So much for posting this. You have just made my life so much easier!
  • fred · 1 year ago
    very nice tip, cheers
  • Gary · 1 year ago
    Works nicely. Thanks.
  • test · 1 year ago
    Grate dude
  • Kyle · 1 year ago
    nice, thank you
  • Mike · 1 year ago
    So, I centered the Google map and then copied and pasted some kind of code into my browser. I started with Morse code. Since I had nothing but time, I actually wrote out "dot" and "dash" as I entered the code. I encounted one problem. I do not know Morse code. Anyway, I entered " javascript:void(prompt('',gApplication.getMap().getCenter())); " into my browser. At first there was this slight odor of melting plastic. Then I noticed smoke. So I shut off my computer. Then I thought, Hey Mike, why not go out and by a GPS system. I figured that had to be easier than trying to figure this out, though probably more difficult than advanced Geometry. So that's what I did. And I was right, it was easier.
  • Debbie · 1 year ago
    Great tip! Did exactly what I needed! Not easy getting some locations to map into the Google maps plug-in for Wordpress.
  • Timothy Bowers · 1 year ago
    Amazing and yet so simple, thanks for this tip!

    I'm surprised Google don't just display this in an easy to see location for people.
  • Adam · 1 year ago
    Thanks a lot. Been trying to find the exact location of my house.
  • Cristian Palmas · 1 year ago
    Hi.

    I tried to use the code but I failed. Perhaps I misunderstood what is "the location bar of your browser". Can you explain further what "location bar" is?
    Thanks.
  • bRo · 1 year ago
    The location bar is the area up at the top of the browser where you can type in the location of a web address. For example, when you visit www.yahoo.com, you will notice an area up at the top that displays "http://www.yahoo.com". That area is the location bar.
  • FreakEROS · 1 year ago
    Thank you very much!!! =]
  • Prasad · 12 months ago
    Thank you very much for this. It works and really helpful. I have been looking for this from long time. Earlier, Google maps used to display the GPS position if you drag the location marker off the requested location on the map. I don't know why one fine day Google stopped displaying the GPS position on the map. It only displays the street name now.
  • johan · 11 months ago
    sorry to dissapoint you all, but it does not display degrees, minutes and seconds, it displays degrees and decimal fractions of degrees....
  • lanes · 10 months ago
    yup, it does work for me.
    thanks man
  • Peter · 10 months ago
    "the location bar of your browser"... is the place on your web browser where you type the web address, web link, URL, or URI. It's >not< the place where you put the address that Google Maps finds or has already found for you.

    Thanks for the tip! Very nice.
  • waqas · 10 months ago
    just one word - awesome........and not just cheers... also beers lol
  • Miguel · 9 months ago
    Excellent tip, I am using it now, my work is easier.
    Thank you.
  • Ankur · 8 months ago
    Awesome man...this trick really worked n helped me a lot.
    Thanx
  • Fei Chen · 8 months ago
    It helps, thanks a lot!
  • Joe · 8 months ago
    Very nice tool. This came in very handy. Thanks.
  • Tobes · 8 months ago
    great, thanks for that. T
  • Lester · 7 months ago
    Good jobs! Help me a lots....
  • divayouknow · 7 months ago
    worked like a charm- thanks!
  • Sameer · 7 months ago
    Thanks
  • Sameer · 7 months ago
    Thansk Working for me
  • Irawan · 6 months ago
    Doesnt work for me.... so when I got my location in centre it was :

    http://maps.google.com.au/maps?hl=en&tab=wl

    And dis you mean I just add that code at the end of the address or should I do something prior?
  • sfsdf · 6 months ago
    doesn't work
  • apps · 6 months ago
    Works
  • Frank · 6 months ago
    works perfectly.
  • Robert · 6 months ago
    Location bar? WTH?
    Can you paste an example for us???
  • murreehotels · 4 months ago
    But why doesnt it work with windows vista? is there a different version for that?
  • tucsonjhall · 4 months ago
    This all works very nicely but you can also search an address in Google then right click on the pin and choose What's Here? and it will display the lat and long in the query input field. Nice because you can cut and paste that into another app.
  • Joseph Elfelt · 2 months ago
    Actually right-click on the pin does not get you the center of the map except by mere chance. Instead, it gives you the coords where you right-clicked. You can confirm this by clicking different parts of the pin and comparing the results to the javascript method that is the subject of this thread.
  • Paul · 4 months ago
    Great very useful for plotting routes with a GPS
  • mathew8881 · 4 months ago
    cool...thx a lot
  • nick · 4 months ago
    you rule!!!!!!!!!!!!!!!!!!!!!!!

    works "just fine"(perfect to be exact ; ) !!!

    i wonder why is it so freakin' hard for google to provide this info anyway...could it be $ issues ; ( ?

    a big thanks!!!
  • gopu · 4 months ago
    Thanks foe the informatiom
  • janna5 · 3 months ago
    Thanks for this hint it was very useful.
  • SpyBlogger · 1 month ago
    Wow I needed it a lot!
  • spasmodic · 3 weeks ago
    Great, thanks! Anyone know how to get it to display UTM rather than lat/long?

    For those struggling to make this tip/recipe work, try this: copy the javascript snippet. Open bookmarks -> organize bookmarks (in firefox - not sure how to do it in other browsers). Click 'organize' -> 'new bookmark'. In 'name' type whatever you want. In 'location' paste the javascript. Click 'ok'. Close the bookmark organizer. Go back to google maps, centre the map wherever you want, then go to your bookmark menu and select the bookmark you just created. A popup window will appear with the latitude and longitude of the centre of the map.
  • Shripad Lale · 3 weeks ago
    Amazing! Very simple and works great! Thanks for the great tip.

    regards,

    Shripad
    ======
  • Ajay · 1 week ago
    wow kool, I didn't know it was so easy to find long and lat. I used to read them from the embed code.