Is it possible to generate a route without going down the same street again?

Asked

Viewed 28 times

1

I’m using the Google Maps API which has as an example the waypoints in Directions to generate a route using several points on the map. Depending on the address I enter on the map, a route is generated by returning by the same street already passed once. I really want to disregard that going back through another street the path would be longer, so not passing through the streets already covered.

See below for an example:

  1. R. Ernesto de Castro Neves, 588 - Jardim do Alvinopolis, Atibaia - SP, 12943-270
  2. R. Prof. Nilo Andrade Amaral, 230 - Jardim do Alvinopolis, Atibaia - SP, 12943-460
  3. Av. Santos Dumont, 342 - Ponte Alta, Atibaia - SP

Below is how the route of the above addresses is generated, considering the address 1 the starting point, the address 2 as an intermediary and the address 3 as the end:

inserir a descrição da imagem aqui

And now how I wish it was the route:

inserir a descrição da imagem aqui

It is possible to generate a route without going through the same street again?

  • Your problem has some similarities with the Chinese postman...

  • 1

    So @Jeffersonquesado, I’m giving an inquiry of how I can implement this, whether it’s Chinese, Japanese, Indian, etc. hueha

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.