3

I want find the shortest path/route between multiple locations available. i.e. suppose I have five locations A,B,C,D and E, I want to find the nearest location (using route distance not normal distance).

Currently I am making 5 URL and calling Google Direction API for result and comparing them. But it's long and time consuming process. Is there any alternative?

I also thought of using distanceTo() and distanceBetween() method but i think it doesn't show the route distance.

Any suggestions please....
Thanks

7
  • Check this, Haversine is what you require.
    – Junaid
    Aug 26, 2014 at 10:19
  • thanks for the reply ... i'll have a look.. Aug 26, 2014 at 10:24
  • Welcome, do check the .pdf document. Its all explained in there.
    – Junaid
    Aug 26, 2014 at 10:28
  • It's a great document but it's similar to distanceTo and distanceBetween method. It returns the direct distance between two location but i am looking for the route distance between these two locations... Aug 26, 2014 at 10:42
  • Maybe KML is helpful in your case, I am not sure but you can check here
    – Junaid
    Aug 26, 2014 at 12:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.