Overview
How the routing works
- Each port is linked to one or more nearby sea nodes (waypoints).
- Sea nodes are connected by sea edges with a nautical-mile weight.
- The calculator runs Dijkstra's algorithm on this graph from origin's nearest node to destination's nearest node.
- The resulting polyline is rendered on a Leaflet map so the route follows water, not land.