Routing

Click-to-add waypoint routing on the map-view block: numbered, draggable, role-coloured pins, the accent-yellow route line and a floating info bar with traffic and unit toggles — fetched from the mock nx-geo routing endpoint (POST /api/geo/route).

$bunx shadcn@latest add @nx-ui/route-tool
Registry item

Waypoint routing

A muck-away haulage route from Winchester to Brighton. Green pin 1 is the origin, red pin is the destination, amber pins are stops in between; the info bar shows live distance and duration with km/mi and traffic toggles, undo and clear.

Click the map to add numbered waypoints, drag a pin to re-route, click a pin to remove it. The fetch debounces 500 ms and aborts stale requests while you drag.