Find nearest tube station

When I first released Blunderground I put together a ToDo in the README of cool features I could implement if I get some time, one of which read: “Zoom to nearest station (get location from OSM)”.

Well, Neil recently got a Pre and decided that a good way to learn the WebOS API’s etc would be to contribute to Blunderground, and contribute he did – with an awesome patch to implement a “Jump to Nearest” button!

This adds a huge data file to Blunderground (> 1000 lines) that includes all the required data to find which tube station is nearest to the devices current GPS location and then zoom the map to that station.

I then decided to steal some glory from Neil by converting the main map to be a HTML canvas (rather than an img tag) and adding some slight bling for his feature:

The overlay will dissapear after 10 seconds, which could probably be handled in a nicer way…

2 comments

  1. I tried Blunderground on the device and the new canvas stuff is working really well. Two small comments though- it’d be good to have some kind of feedback when the phone is fetching your location because sometimes it can take ages and it feels like it’s ignoring you. Also if the station it chooses ends up centred on the screen then the label in the box can sometimes end up half off the screen.

    I found this cool page on the WebOS site which tells you how to fake the GPS signal in the simulator:

    http://developer.palm.com/index.php?option=com_content&view=article&id=1662

    Neat!

    It doesn’t make it clear though that the luna-send command is on the device, not in the SDK, so you have to run novaterm first to log in to it.

  2. Thanks for testing it Neil! Completely agree with both of your suggestions, I was aware that both may be a problem but didn’t have the time to work on either of those things before I went away and really wanted to write about the cool feature you added 🙂

    Will add them to the to-do and hopefully get around to fixing them soon.

    That link is great, thanks very much!

Comments are closed.