Vehicle progress
Place a vehicle between two stops from a 0–1 progress value.
Preview
Usage
Getting the data
TfL arrivals have no coordinates. line.getArrivals gives timeToStation at each stop. Two times on the same vehicleId become a 0–1 progress value.
progressBetweenStops(30, 90) // 0.5
progressBetweenStops(40) // 0 — only the next stop is knownRender
pointBetweenStations takes that progress plus two station coordinates and optional route polylines. Pass the point as a vehicles row on Map – Tube & Rail (Geo) or Map – Bus (Geo).