aklowther / hackhillsborough

Hillsborough Hack-a-thon
1 stars 1 forks source link

How to get bus locations #2

Open luqmaan opened 11 years ago

luqmaan commented 11 years ago

To get the bus locations:

  1. get the routes:

    http://onebusaway.forest.usf.edu/api/api/where/routes-for-agency/Hillsborough%20Area%20Regional%20Transit.json?key=_____

    or from:

    http://onebusaway.forest.usf.edu/api/api/where/route-ids-for-agency/Hillsborough%20Area%20Regional%20Transit.json?key=_____

  2. get the trips for the route:

    http://onebusaway.forest.usf.edu/api/api/where/trips-for-route/Hillsborough%20Area%20Regional%20Transit_6.json?key=_____

  3. get the trip details for the trip:

    http://onebusaway.forest.usf.edu/api/api/where/trip-details/Hillsborough%20Area%20Regional%20Transit_901863.json?key=_____

    which yields:

    "totalDistanceAlongTrip": 25656.41681298752,
    "scheduledDistanceAlongTrip": 15265.987800172239,
    "lastKnownLocation": {
        "lon": 27.99045181274414,
        "lat": -82.39317321777344
    },
sciprojguy commented 11 years ago

Do not know.

Sent from my iPhone

On Apr 16, 2013, at 6:07 PM, createch notifications@github.com wrote:

To get the bus locations:

get the routes:

http://onebusaway.forest.usf.edu/api/api/where/routes-for-agency/Hillsborough%20Area%20Regional%20Transit.json?key=_____

or from:

http://onebusaway.forest.usf.edu/api/api/where/route-ids-for-agency/Hillsborough%20Area%20Regional%20Transit.json?key=_____

get the trips for the route:

http://onebusaway.forest.usf.edu/api/api/where/trips-for-route/Hillsborough%20Area%20Regional%20Transit_6.json?key=_____

wtf, whey are there 25 trips for

get the trip details for the trip:

http://onebusaway.forest.usf.edu/api/api/where/trip-details/Hillsborough%20Area%20Regional%20Transit_901863.json?key=_____

which yields:

"totalDistanceAlongTrip": 25656.41681298752,
"scheduledDistanceAlongTrip": 15265.987800172239,
"lastKnownLocation": {
    "lon": 27.99045181274414,
    "lat": -82.39317321777344
},

— Reply to this email directly or view it on GitHub.