Dijkstra’s algorithm on OpenStreetMap with dynamic cost manipulation

This page demonstrates a JavaScript implementation of Dijkstra’s algorithm applied to geospatial data from OpenStreetMap. Edge costs (geographic distance) have been randomly discounted or penalized.

Technologies used:

The purple lines represent a discount graph. The orange lines represent a penalty graph. The white line represents the modified shortest path. Drag either endpoint to adjust the position.