Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Get Lat Lon. I finally got fed up of hunting around for simple latitude/longitude tools when messing around with mapping APIs, so I built my own with a memorable URL. I plan to add new features as and when I need them.

Tagged , , , , , , ,

38 comments

  1. Thanks a lot. This is realy helpful. When I was adding alot of locations to a new webapp the last couple of weeks, I thought about this idea, too.

    Could you alter the view to make it possible to append a lat, long and high value in the url? This would make it possible to jump to an area pretty fast.

    jfroehlich - 12th October 2007 15:27 - #

  2. Much appreciated, thanks. Shocking that it was necessary to build it really, but I have encountered the same frustrations as you.

    Ciaran - 12th October 2007 15:33 - #

  3. Yay, this looks very useful :) Enabling scroll-wheel zoom would be good (though not exactly crucial).

    Jon Leighton - 12th October 2007 16:05 - #

  4. It'd be handy to be able to single-click to center the map. Took me a few seconds to puzzle out that I was centering the map to pick a location rather than moving the crosshairs; having the map move would've made it plain.

    Peter Harkins - 12th October 2007 16:35 - #

  5. Finally a simple service to do just that \o/. As for features it seems to me that a search would really be handy.

    Sunny - 12th October 2007 17:25 - #

  6. Wow, glad other people have had the same itch! I've enabled the scroll wheel now. I'm thinking about the other feedback - I definitely intend to add geocoding search of some sort.

    Simon Willison - 12th October 2007 17:35 - #

  7. This feature has always been available on multimap.com, just take a look under the map :)

    Colm - 12th October 2007 17:47 - #

  8. (of course the web app is still lovely)

    Colm - 12th October 2007 17:58 - #

  9. Wicked. Thanks for sharing!

    C.

    Carlo Zottmann - 12th October 2007 18:04 - #

  10. OK, I've added geocoding search as an undocumented feature. If you add a search term to the page as a query string it will use Google's geocoder to re-center and zoom the map, like so:

    http://www.getlatlon.com/?london

    I'll add a UI for that some time soon.

    Simon Willison - 12th October 2007 18:08 - #

  11. Cool - this is a very handy tool. I have a related website that might be of interest to you. It calculates elevations given a file of lat/lon values. a beta version is at www.LatLonToElevation.com

    Matt - 12th October 2007 23:21 - #

  12. I'm somewhat confused - what does this do that Google Maps doesn't already do in the 'link to this page' window? It seems kind of overkill to create a whole website to avoid copying and pasting from the URL bar...

    Daniel Drucker - 13th October 2007 00:35 - #

  13. If messing around with mapping API's, surely you have fairly simple geocoding tools available to you. eg,

    http://developer.multimap.com/API/geocode/1.2/open apidemo?qs=brighton&countryCode=UK

    Seems to do the job fairly well for me. :)

    Andy Hume - 13th October 2007 01:22 - #

  14. Daniel: to be honest pretty much the only thing this gives you over Google Maps is the crosshair. I usually want to centre the maps that I create precisely on a certain point: to do that I need the exact lat/lon pair and the exact zoom level as well. Finding these was just frustrating enough to justify building a custom tool, and since I needed it I figured it could be helpful to others as well, especially if I put it up at a memorable URL.

    Simon Willison - 13th October 2007 02:22 - #

  15. Seems to me like this is a job for greasemonkey...

    Daniel Drucker - 13th October 2007 02:26 - #

  16. Gotta love the stop energy. Especially the "you could solve this by using a non-existent script for a custom extension to a specific browser, so doing it in a simple and fully portable way that doesn't require installation of anything is pointless" variety. Wankers.

    Fredrik - 13th October 2007 07:14 - #

  17. Cool.

    I've been using FlashEarth.com for this.

    Get a cross hair, lat-lon, search, and access too many different map tiles.

    Sure, it's flash, not HTML, but it's bloody useful =)

    Mark S - 13th October 2007 12:31 - #

  18. Awesome. I would have loved having something like this about a year ago when I was working on a Google Maps-based web app. Nice work, and great URL.

    Bernie Zimmermann - 14th October 2007 01:00 - #

  19. What about creating an API for this service?

    Henrik Lied - 14th October 2007 12:06 - #

  20. I can't think of a way of building an API around this that would be useful - there's no server-side code at all, in fact the entire site consists of just two files: a static HTML page and a single background image for the crosshair.

    Simon Willison - 14th October 2007 12:27 - #

  21. Henrik, the API can be found at http://www.google.com/apis/maps/documentation/serv ices.html#Geocoding

    Crescent Fresh - 14th October 2007 12:28 - #

  22. There is a problem that when this site gets really, really popular you will exceed the limit of 50.000 geocode request per day. Per day that is!

    Berry - 14th October 2007 12:42 - #

  23. Berry: the geocode request restriction is per-IP, and since the lookups are done using client-side JavaScript the IP address is that of the user. This means every visitor to the site with a unique IP gets up to 50,000 geocode requests a day, so I don't need to worry about that side of things at all.

    Simon Willison - 14th October 2007 15:39 - #

  24. I use http://www.informationfreeway.org/ for this since I'm an OpenStreetMap kind of guy. But having the coordinates change on the cursor move means you can't copy+paste, I guess.

    Andy Allan - 14th October 2007 23:00 - #

  25. Andy: exactly! I had the same problem with a bunch of the other ones I looked at. Another common issue is ones that give you the lat/lon for a marker - the problem being that markers leave the exact point a little ambiguous. That's why I went with a custom crosshair in the center of the page.

    Simon Willison - 15th October 2007 00:00 - #

  26. Fantastic Simon, just what I need! It's been a real pain finding the lat/long of precise locations (and appropriate zoom levels) for places in Pepys' Diary.

    Phil Gyford - 15th October 2007 16:54 - #

  27. also check:

    http://maps.forum.nu/gm_plot.html

    It is the best tool I have found for drawing polygons on top of a map and export coordinates by cut&paste or Json...

    Lucap - 16th October 2007 09:06 - #

  28. Thanks for this Simon. Yet again you've done the right thing at the right time(for me). Was having the same lat lon frustrations and this helps getting things sorted.

    Leon - 24th October 2007 11:16 - #

  29. My site http://www.earthtools.org/ has done all this and more for over a year now!

    Jonathan Stott - 25th October 2007 22:26 - #

  30. Jonathan: earthtools is almost what I was looking for, but it doesn't show the Google Maps zoom level (important for making a mashup) and more importantly it doesn't show up when you search for "find latitude longitude" on Google, so I completely missed it when I was looking for a solution (despite having played with your fantastic APIs in the past - I think you've redesigned the homepage since then).

    Simon Willison - 26th October 2007 00:19 - #

  31. Simon,

    I've added a "Google Maps Zoom Level" field on the Location tool: http://www.earthtools.org/map/51.944264879028765/- 1.8896484375/6/5/Map/

    Getting to the top of Google's search results is less easy - EarthTools is down at around 13th when I search for "find latitude longitude", but has been slowly rising.

    Jonathan Stott - 27th October 2007 11:11 - #

  32. Excellent! A simple, intuitive function. I was struggling to find a speedy way for creating geocodes for various locations on www.beatlesmapped.com - now I'll be able to speed up additions to the site.

    andrew pendrick - 13th December 2007 20:07 - #

  33. Hi, brilliant tool. Just adding my +1 to the idea of single-clicking to center the view.

    Matt Fletcher - 7th July 2008 12:12 - #

  34. Excellent work. Do you live in Kansas City? I live in KC. I am about to launch alpha version and would like to visit. send email to vstilw01@yahoo.com

    VStilwell - 10th October 2008 11:25 - #

  35. Very helpful. Excellent.

    Will Fastie - 16th October 2008 04:34 - #

  36. Refreshingly clean and simple. Thanks Simon. God bless

    Steve Crocker - 8th November 2008 13:12 - #

  37. Very nice tool, thanks. Since you're looking for ideas....

    It'd be nice to have some way to quickly copy a lat/long pair to the clipboard. One way would be to mimic what Google Maps does with the "link to this map" thing, but perhaps it's possible to always keep the lat/long text selected so that the user only need copy it?

    Another idea is to keep the lat/lon in the url all the time, by writing it to document.location.hash. The modern version of Yahoo! Maps does this, which I think is spiffy.

    Jeffrey Friedl - 11th November 2008 14:27 - #

  38. Great!
    Love it excellent tool.
    Like to double check Land Surveyors work
    Suggestions for additional options - more zoom capabilities (prob not for free right?) - markers (flag multiple spots on the map. GE have built in tool but I like this one better

    Jarlath - 23rd February 2009 20:44 - #

Sign in with OpenID

Auto-HTML: Line breaks are preserved; URLs will be converted in to links.

Manual XHTML: Enter your own, valid XHTML. Allowed tags are a, p, blockquote, ul, ol, li, dl, dt, dd, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, br, pre

A django site