block by emeeks 8edaa27a121dc2a227ec

Simple Pathfinding

Full Screen

Simple topoJSON pathfinding. Click on a circle to set a source and click on another circle to set a destination.

This example derives a set of nodes for each common endpoint of a line, and as such relies on the geometry of those end points being the same. Along with an node list, the lines are annotated with their source and target and an edge map is created in the format used by the dijkstra implementation in dijkstra.js.

index.html

d3map.css

dijkstra.js