HomeData-aware

PreviousNext

Live buses

Place buses on a route map from live GPS.

Data-aware
Uses foundationsColours

Preview

Usage

<LiveBusVehicles
  busRouteIds={["24"]}
  targetRequestsPerMinute="max"
  busPositionSource="auto"
/>

Getting the data

TfL arrivals have no bus GPS. Register on the Bus Open Data Service, set BODS_API_KEY, and poll SIRI-VM. Auto uses GPS when the key is present, and falls back to arrival countdowns when it is not.

const activities = await fetchBodsVehicleActivities({
  boundingBox: [-0.18, 51.48, -0.10, 51.56],
})

Render

Pass the route ids you want. Paint goes through Map – Bus (Geo). Trains are a separate component — Live Tube & Rail vehicles.