At this point it should be obvious that simply applying a basic graph traversal algorithm like Dijkstra’s would be too simplistic, so what do services like Google Maps and others use?
While the exact technology behind Google Maps is a trade secret and not open-source, by most accounts, it uses Dijkstra's algorithm to calculate the shortest distance from point A to point B.