Map
Selection and focus
Selected, focused and pressed states on the map and in lists.
Route-view behaviour, Signal styling: thick route-colour track ahead, quiet passed track, bold path labels and an emphasised next stop.
Named design states
| State | Presentation |
|---|---|
route.ahead | Twice the normal lane width, full route color, same lane offset. |
route.passed | Thinner and muted; passed stops and names greyed. |
route.dimmed / hidden | Unrelated network recedes or disappears: with a selected vehicle, every other line; with a selected station, the lines that don’t serve it and their stations. Receding lines and marks use opaque colours mixed toward Map ground, so overlapping pieces never show through, and they reserve no label space. |
stop.selected / onPath | Enlarged mark, bold name and ETA when supplied. A selected station adds an Always Ink dot inside each circle. |
stop.next | Largest mark, direction glyph, first label priority. |
stop.passed / dimmed / hidden | Muted, quiet or absent. Applies to station and bus marks. |
vehicle.selected | Enlarged route-colour teardrop, upright Signal glyph and ETA chip. Other vehicles become vehicle.hidden. |
designState('stop', { next: true, routeView: true }) // 'stop.next'
stateProperties('route.ahead') // put on a route feature's properties
vehiclePresentation({ zoom, state: 'vehicle.selected', heading, route, eta: '5m' })
Lists drawn like the map
The vehicle sheet's upcoming stops match the map at config.selection.listZoom (z15): the rail at the lane width, each stop as the station mark in its design state, the selected pin at the top. Take every size from Signal; apply opacity to the whole mark or rail.
const rail = lanePresentation({ route, theme, state: 'route.ahead' }) // width, casing, color
const mark = stopMarkPresentation({ state: 'stop.next' }) // size, styles.outline › fill › dot
const pin = vehiclePresentation({ zoom: config.selection.listZoom, state: 'vehicle.selected', heading: 180, route })
Path labels
Name first; ETA beneath when known. Figtree Bold, Always Ink in light mode and Always White in dark mode, with a solid 1 px inverse-color halo (white in light, Always Ink in dark). A selected station scales its mark and label to 1.5 without changing font or colors. Passed and unrelated labels recede through opacity. Labels clear the mark’s widest extent. As zoom decreases, opacity ramps thin labels by priority: next → on-path → selected → passed → others. Labels try alternate anchors around each station. Invisible collision-only symbols reserve the track bundles, so names move off the lines as well as avoiding each other. Dense views may suppress lower-priority stops when no clear position remains.
A selected bus run supplies sparse Point features to selection-stops. busRunStopLayers draws Brand bus-stop squares from overview zoom and uses the same name/ETA label treatment, halo and stop.next / stop.onPath priority as train path labels. A collision reservation along the selected bus route moves names above or below the line; radial clearance keeps them outside Signal’s selected-vehicle and rider-location marks, and a label drops when no clear anchor remains. This source contains only the selected run’s upcoming stops; the full bus-stop source and its selected-stop route capsules stay unchanged.
{
type: 'Feature', geometry: { type: 'Point', coordinates: [-87.627, 41.885] },
properties: { stopId, name: 'State & Lake', eta: '4 min', designState: 'stop.next' }
}
Camera
routeCamera limits framing to the vehicle plus five upcoming stops within 4 km, never the whole run. The app applies the returned bounds and sheet/sidebar padding once on selection, placing the vehicle near the upper 30% of the visible viewport. Polling does not refit the camera.
Accessibility
Keep a 44 pt hit target separate from the visible mark. Name the route/stop and selection in accessible controls outside the canvas; the app’s list is the nonvisual map alternative. Reduced Motion disables programmatic camera travel and style transitions, not gesture-driven continuous scaling.