I want to find all possible routes from point A to point B (not only shortest ones). So my question is, is there any web service api (because I use Java) for such request in Google Maps, Yahoo Maps etc. it doesn't matter which one..
-
This sounds like a really difficult problem. Even for short journeys, there are many many different ways for getting from A to B. It seems unlikely that any provider will offer this service, due to the large computation time + data transfer required. – Oliver Nov 22 '11 at 13:33
-
http://code.google.com/apis/maps/documentation/directions/ – Sully Nov 21 '11 at 22:20
-
I know that Google Maps have its directions api, but it gives me only the shortest path from A to B...But I want let's say directions from A to B limited with 10 km's – Zaur Guliyev Nov 21 '11 at 22:29
3 Answers
I've found something about this topic in Google Maps Directions Api: "alternatives (optional), if set to true, specifies that the Directions service may provide more than one route alternative in the response. Note that providing route alternatives may increase the response time from the server." But unfortunately, I couldn't use this option, when I include alternatives=true inside request query I get the same result. That would be nice to have such an alternative - it's more flexible, but I found something guarantied one with waypoints (but its much like "hardcoding" - we specify streets that we will pass from). Anyone tried alternatives=true?!

- 4,254
- 7
- 28
- 44
Here's another approach and solution for this problem: convert meters to latitude longitude from any point
Thanks for your responses..

- 1
- 1

- 4,254
- 7
- 28
- 44
I'm using the fact that google maps' paths uses rounding boxes to get a circle, to do so i just choose the point that i want and create a route to another that is not the same but very very close to it, just like:
We can choose the weight as the diameter of the circle, note that it is a fixed value, not related to the screen size and the zoom.