2

I am building a webservice which returns distance of various shops, from lat,long received from mobile.

For that I want to use osm table api, but it return zero for search on lat,long:

Click on link: http://router.project-osrm.org/table/v1/drive/22.9755,72.5024;23.0143,72.5647;23.0483,72.4796?sources=0

Here I'm search for below matrix:

     From       |       To
22.9755,72.5024 |  23.0143,72.5647
22.9755,72.5024 |  23.0483,72.4796

If I search manually in there website (http://www.openstreetmap.org/search) and it return correct distance.

  • Those coordinates in Ahmedabad, right ? – Shiko Sep 30 '16 at 7:40
  • Hi Shady, correct It is in Ahmedabad – Ravi Sep 30 '16 at 7:43
  • Well, now your URL works well as per below answer – Shiko Sep 30 '16 at 7:43
  • @Shaddy, Thanks, link is working fine now, but it is returning durations and not distance, do you have link for me about documentations – Ravi Sep 30 '16 at 7:50
4

You need to swap the coordinates, Lat in place of long and long in place of lat as below:

http://router.project-osrm.org/table/v1/drive/72.5024,22.9755;72.5647,23.0143;72.4796,23.0483?sources=0

| improve this answer | |

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.