A trip drawn on as a glowing line with stop marks and a "now" beam; the camera tilts in and comes back exactly where it was.
$ npx shadcn@latest add @highcommand/route-traceCopies the source into your project and pulls in what it needs (1 other item). First time? Add the registry to components.json.
The holographic route trace: a trip's road driven as a glowing accent line that draws itself on once (600 ms; whole with reduced motion), the road ahead dashed, each stop's mark (done, next, ahead, at risk ▲, late ◆, depot) and the vehicle's ring and "now" beam.
focusrequiredTripFocus | null—The trip (build one with tripFocusFrom from
framebooleantrueTilt and frame the trip when it opens, and restore the camera when it closes. Default true.
followbooleanfalseNear the vehicle: the camera follows it, close in.
padding{ top: number; bottom: number; left: number; right: number }—Px kept clear around the trip when framing (a filter bar on top, a card below).
addTrace(map: Map$1, c: TraceColors, opts?: { before?: string | undefined; width?: number | undefined; }): { set(f: TripFocus | null): void; drawOn(ms?: number): void; stop(): void; }The trace on a MapLibre map: the road already driven as a glowing accent line that draws itself once (600 ms; whole with reduced motion), the road ahead dashed, each stop's mark, and the truck's ring and "now" beam. One source each, under `before`. `set(null)` clears it.
boundsOf(pts: readonly [number, number][]): [[number, number], [number, number]] | null[[west, south], [east, north]] of some points (a metro's route never crosses the antimeridian).
pointsOf(f: TripFocus): [number, number][]Every point of a trip's view: its road and its stops (what "whole route" frames).
Install this free piece now; the Pro pieces drop in on top of it, in the same app. Pro is $79 once.