Notices


Reply
Thread Tools
Posts: 51 | Thanked: 48 times | Joined on Jun 2010
#21
Hi all,

There is actually a semi-official API for tfl, which I use for my TflApp: http://talk.maemo.org/showthread.php?t=56390
Currently the app just routes you from current location to a specified postcode, but you should be able to use the same API to write a proper journey planner.

Some of the APi documentation is here: http://wiki.opentfl.co.uk/TRIP_REQUEST2 ...and the rest can be figured out by just using firefox/tamper data and the tfl website (just change XSLT_TRIP_REQUEST2 from the url to XML_TRIL_REQUEST to get the data returned in XML format)

Hope that helps
PS: Note that TflApp also includes an offline tube map, which is just a png: You should be able to overwrite /opt/tflapp/tubemap.png with a higher res picture and it should still work.
 
Posts: 51 | Thanked: 48 times | Joined on Jun 2010
#22
Oh and tfl have been a bit arsey in the past with third party applications using this data. See here, for eg: http://mbarclay.net/?p=842 ...so please be nice and don't hammer the API too hard

Also, I'm using the "user" frontend, but might be better to use the ultralite one so save on bandwidth

Some URL examples (route from two random postcodes, for example -- change type_origin to be address, OS grid reference, or anything you want)
Mobile website:
Full XML
ultralite XML

It has always been on my TODO list to do a proper journeyplanner, but here's hoping someone else can take this on
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:19.