With many networks it is useful to know the shortest path between two points (nodes).
The demo shows how to use KeyLines' shortestPaths function to find the path between two points. The network represents cities and the connections between them, with both the travel time and distance between them.
Clicking two nodes consecutively provides the shortest route based on the selection on the side panel. You can also recalculate the same path with a different criteria by selecting a different weighting option.
Key functions used: