[OSRM-talk] take only distance from route

Nikhil VJ nikhil.js at gmail.com
Fri Jun 19 03:56:12 UTC 2020


Hi Luiz,

Pls provide the exact structure of the API call you are making. There may
be some problems in that. One commonly repeating mistake is that people put
latitude first while OSRM needs longitude first.

Documentation : http://project-osrm.org/docs/v5.5.1/api/

And you will get the distance as part of the whole json response. Then you
have to use your code to extract the distance from that json. If you don't
know how to work with json, just lookup online; it's very easy. You can
paste your response into a "json beautifier" like tool to see the structure
in more familiar ways.

--
Cheers,
Nikhil VJ
https://nikhilvj.co.in


On Fri, Jun 19, 2020 at 7:04 AM Luiz Claudio de Paula Costa <
luiz.netwalk at gmail.com> wrote:

> Can any help me? I need take only distance from route, I am a newby and
> I'm not getting process the json return to extract the distance.
> thanks any help
> luiz from brasil
>
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20200619/dc96ba78/attachment.htm>


More information about the OSRM-talk mailing list