Dijkstra's is very similar to BFS in that it asks each of the origin's neighbors the question of
whether it's the destination or not, and repeats this iteratively or recursively. The
difference, however is that DSPF takes into account so-called "weights", otherwise known as
traffic or anything that would slow someone down on the way to their destination. It does
this by initializing each node, except the origin, to have a distance of infinity from the
origin. The algorithm also uses an array of nodes sorted by each of their distances from the
origin, which gets updated and sorted with every iteration. The algorithm checks the
neighbors of the node closest to the origin and updates their distances from the origin only
if the path to the current neighbor is closer than the array says. This distance is the
number of steps it takes to get to the node closest to the origin, added to the number of
steps it takes to get to its current neighbor. The second addend will be either 1 or the
weight of the weight indicated on the slider. As it turns out, DSPF, or at least a modified
version of it, is apparently used by Google Maps.
See Wikipedia page