1

Let's try to find directions in Google Maps from, for example from:

  • Pamplona (Spain) to
  • Burgos (Spain)

And now, let's try the other way:

  • Burgos (Spain) to
  • Pamplona (Spain)

You'll see that Google Maps returns a different set of routes depending on which sense you go. And it does the same, I should say, when querying it through the Directions API in Javascript.

Why does it do that? What criteria does Google Maps use to decide which route to use or discard in each case? (I have some intuitions about it, but I'd like to know for sure, since we are developing an app that relies in part on the Directions API).

1

this all depends on algorithms Google Maps usees like:

and also it can be influenced by submitted data Google Maps receives

as you can see on this gif here, the route is always created in sequences and from both sides at once until the link up is created, therefore even a smallest obstacle from (like one-way road due to reconstruction) can lead in different results comparing AB and BA points

more on this topic can be found in answers here from people that work in the field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.