Map
Line rendering
How train lines are drawn: lanes, corners and stations.
One immutable geographic centreline per corridor, shaped once at the reference zoom (z17). MapLibre draws each lane from it with screen-space width and offset ramps, so zooming never rebuilds the source.
Lanes
Light
Dark
Five lanes and one connected station mark at z17: the same map-space geometry used at every zoom.
| Rule | Detail |
|---|---|
| Geometry | The API owns corridors, lane membership, signed order and valid turns. trainRouteFeatures simplifies and rounds each centreline, keeps each lane's signed API slot as its laneOffset and adds only API-authorised turn connectors, once, when data loads. Crossings remain crossings. |
| Scale | Route fill and lane spacing share one ramp (lane.width, lane.spacing), so parallel lanes touch at every zoom; Paper casing per side comes from lane.casingPerSide. Widths roughly double per zoom through the mid zooms. |
| Offset | MapLibre places each lane at line-offset = −laneOffset × lane spacing, evaluated continuously while zooming (the API's signed order is positive to the left of the geometry; line-offset is positive to the right). Pan, pinch and fractional zoom never regenerate a source. |
| Order | Signed order comes only from the API relative to each corridor’s direction. Signal has no Loop, Belmont or Blue-specific ordering table. |
| Joins | API turns get static trimmed cubic connectors at the reference zoom; internal bends use one fixed corner radius. Line caps and joins are round. The same geographic coordinates render at every zoom. |
| Stations | Fixed station circles appear from z10.5. Connector bridges, linked-stop links and Loop marks appear above z12; no far-dot geometry or opacity crossfade replaces them. |
| Style profiles | geographic, diagram and boldDiagram apply tokenised paint scales and basemap visibility to this exact backbone. Theme remains independent. Profiles cannot own or alter topology, source coordinates, spacing, offsets, corners or turns. |
| Direction | Chevrons only on the one-way Loop lanes (Marks). Every other lane is bidirectional and has none. |
Sizes per zoom: Zoom ramps.