All examples By author By category About

emeeks

Simple Pathfinding

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.