[GIS] OSM table(Matrix) Api returning distance 0 for small routes

apidistance matrixopenstreetmaprouting

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.

Best Answer

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

Related Question