openplannerteam / planner.js

JavaScript library for route planning 🚴‍♂️🚉🚀
https://planner.js.org
MIT License
39 stars 10 forks source link

Fix reconstruction of simple Dijkstra pathfinding #160

Closed tuukka closed 3 years ago

tuukka commented 3 years ago

When following the found path backwards from the destination, choose the edge and node that together have the least cost to the origin.

hdelva commented 3 years ago

Nice catch, appreciate the help!