Trainhound: An HTML5 geolocation-aware web app for UK train times
So, a long time between posts and fair to say that I’ve only just got enough to have a ‘between’!
Recently we at Metia Labs, have been introducing ourselves to HTML5 and the current crop of both browser support and levels of that support. We’d also been looking at doing something useful with data feeds and came up with an excellent contender of an idea for a proof-of-concept project.
I like my smart-phone, in my case an iPhone, in other’s cases here at work, Android, additionally I catch the train into central London for work everyday. How cool would it be to have access to National Rail’s departure boards on my phone? Not a full journey planner but something nice and simple, I want to see the boards for the station I’m at or about to be at. Then we struck a very important point: the iPhone’s implementation of the current HTML5 standard includes native geolocation. Meaning in short that via an HTML app I can reach out to the phone’s geolocation service. How well would that work we wondered?
In essence then not only could I get a particular station’s departure board but also get the departure boards for the station I’m at right now and the stations nearby effectively doing a proximity search and making validated filtering assumptions thereby making the information instantly more useful… if it was correct
Well a week’s worth of work and a couple of weeks of iteration and testing and we have a beta launch candidate! We’ve named the beta TrainHound and it does a fairly good job on an iPhone (OS 2.~ and later) or Android 2.0+ as well as Chrome on the desktop.
So without further ado here it is!
Currently it has a basic feature set but it’s a set that we’re really happy with. If you’ve given the site access to your geolocation it will go off and identify the top 10 closest stations to you in order of nearest to furtherest . You can also do a search for any UK station and the site also keeps track of your last 10 viewed stations. When you select a station it will show you the departures for that station in a scrollable list. You can swap the list view between departures from the station and arrivals to the station as well as viewing a simpler information view by toggling the service operator name with the ‘less info’ button. Then you can click any of the rows in the table to view the stations called at and time estimates with navigation to get you back to previous pages.
Additionally from the main stations select screen you can refresh your geolocation and from the station screen you can refresh the departure board.
I can say that this webapp has already come in handy for me several times now as well as others on the team. Specifically when down in Brighton recently and heading back to the station up the hill checked to see if we’d make the service in time. We wouldn’t have made the train in the 6 minutes we had to spare so a quick pint at the pub we happened to be checking outside of was in order; much better than waiting at the station for 25 minutes!
Also when individual stations’ board display systems go down the data feed is still updated and so having your own access really helps.
Lastly the iPhone specific Meta tagging Apple’s pushed out is quite cool, allows us to use a custom splash screen and also remove the browser chrome when you run the page as a link from your home screen. HINT: I didn’t actually know about creating shortcuts to sites as a home screen link which you do via the + button on the bottom of the safari toolbar. A few iPhone features I’ve found out about lately that seemingly aren’t common knowledge…
All in all I’m really impressed not only with HTML5’s scope in general but also Apple’s support of HTML5 on the iPhone which after reviewing test scores through www.html5test.com apparently outscores the most recent release of Safari for Windows.
So a very positive outcome for future web app possibility; go, use it and let us know what you think and how you use it.
/D












Rocketpanda RSS