HOWTO: use latitude and longitude with Google Maps

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
Posted by Jason Striegel |
Aug 2, 2007 07:50 PM
Google Maps, Mapping |
Permalink
| Comments (7)
Recent Entries
- Poromenos' hello world curve
- USB CapsLocker and Sun keyboard simulation
- Robosapien has a coil gun
- Faster Windows shutdown
- Assign USB drives to a folder
- Little drummer bot
- CSS ad blocking for Firefox and Safari
- Design Coding: web standards rap
- Shredz64: Guitar Hero for C64
- BATMAN: adhoc mesh routing
Comments
Newest comments listed first.
| Posted by: MacGyverS2000 on August 3, 2007 at 6:16 AM |
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).
| Posted by: jason_striegel on August 3, 2007 at 9:48 AM |
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
| Posted by: ltt on August 4, 2007 at 9:47 PM |
@ 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.
| Posted by: cyenobite on August 6, 2007 at 12:56 PM |
...also just click on the "link to this page" the Lat and Long show up in the link... in several different formats.
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- AppleTV
- Astronomy
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- OpenOffice
- Outdoor
- Parenting
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
Recent Posts
- Poromenos' hello world curve
- USB CapsLocker and Sun keyboard simulation
- Robosapien has a coil gun
- Faster Windows shutdown
- Assign USB drives to a folder
- Little drummer bot
- CSS ad blocking for Firefox and Safari
- Design Coding: web standards rap
- Shredz64: Guitar Hero for C64
- BATMAN: adhoc mesh routing
www.flickr.com
|





Leave a comment