Route Check is your pre-ride planning tool. Pick a start and a destination and you get the estimated cycling time between them (from the pre-computed travel-time matrix), a rendered road-network route on the map, live availability charts for both endpoints, and a log of recent observed trips on that exact pair. Every component updates live — hover either availability chart to see a time-offset guide on the other so you can plan your departure with confidence.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/samgutentag/bcycle-map/llms.txt
Use this file to discover all available pages before exploring further.
Routes
| Path | Purpose |
|---|---|
/route | Empty planner — station pickers only |
/route/:startId | Start station pre-selected |
/route/:startId/:endId | Full route pre-loaded with travel time and charts |
Station Pickers
TwoStationPicker components let you search for stations by name. Stations come from the live GBFS snapshot, so only currently-known stations appear.
- Swap button (↺ icon) between the two pickers reverses the route direction, rewriting the URL to
/route/:endId/:startId. - Navigation updates the URL path (not query string) on every change so the browser back button works correctly.
Live Station Tiles
Once at least one station is selected, a pair of Live Station Tiles appears — one card per endpoint showing:- A live pulsing dot and START / DESTINATION label
- Station name
- Current bikes available (highlighted in amber)
- Open docks / total docks
- Offline tag if
!is_renting || !is_returning || !is_installed
useLiveSnapshot, which polls every 60 seconds.
Route Map
When both stations are selected, aTripRouteMap renders a MapLibre inset showing:
- The two station pins (start and destination)
- The cached GeoJSON polyline for the pair (looked up from the R2 route cache via
lookupRoute) - All other system stations as context dots
If no cached polyline exists for the pair, the map falls back to an approximate straight-line segment and shows a note: “Approximate route — bike directions not yet cached for this pair.”
Travel Time Badge
TheTravelTimeBadge shows the median cycling time between the two stations from the pre-computed travel-time matrix stored in R2 (travel-times.json).
${R2_BASE}/gbfs/${systemId}/travel-times.json via useTravelMatrix. Each edge stores { minutes, meters }.
Hover-Linked Availability Charts
- Start station chart
- Destination station chart
Shows bikes available at the start station over the last 24 hours (2-minute resolution from parquet). A higher line means it’s easier to pick up a bike.
- A pinned guide at “now” shows the current moment.
- When you hover the destination chart, a crosshair guide appears on this chart offset backward by the travel time — showing when you’d need to leave to arrive at your desired time.
StationOverTimeChart with externalGuideTimeSec and pinnedGuideTimeSec props. Data is loaded by useStationOverTime against the parquet archive.
Average Trip Duration Badge
TheAvgTripDurationBadge shows the mean observed duration across all inferred trips for the selected station pair, sourced from the popularity rollup in R2. This is distinct from the matrix travel time — it reflects actual rider behaviour, including time spent locking/unlocking.
Recent Trips on This Route
Below the charts, a Recent trips on this route panel lists the last 10 observed trips that match the selected directed pair from the rolling activity buffer. Each row shows:- Departure time → Arrival time
- Actual duration in minutes
- A
(+N vs typical)or(-N vs typical)delta against the matrix estimate, coloured amber (slower) or accent (faster)
TripRouteModal — an animated single-trip replay on a small map inset.
The activity buffer holds the most recent 50 trips system-wide. A specific station pair will often show zero rows until it becomes a popular route or the system is very active.
How to Plan a Ride
Pick your start station
Type a station name or scroll the list in the Start picker. The URL updates to
/route/:startId.Pick your destination
Select the Destination station. The full route loads: map, travel time, and both charts.
Check live availability
Scan the Live Station Tiles — are there bikes at your start right now? Open docks at your destination?
Hover to time your departure
Hover the destination chart at your desired arrival time. A guide appears on the start chart showing exactly when you need to leave.
Data Sources
| Source | Used for |
|---|---|
useLiveSnapshot | Station names, live bike/dock counts, offline status |
useTravelMatrix (R2) | Travel time and distance for the selected pair |
useRouteCache (R2) | Cached GeoJSON polyline for the map |
useStationOverTime (parquet) | 24-hour bikes/docks availability charts |
useActivity | Rolling trip buffer for the “Recent trips” panel |
useRoutePopularity (R2) | Average trip duration for the pair |
Related Views
Live Map
See current availability across all stations before committing to a route.
Station Details
Deep-dive into historical charts for a single station.
Flow Map
Watch animated trips to understand typical traffic patterns.
Explore
System-wide travel-time matrix and popular route leaderboards.