[OSRM-talk] RunQuery Output

Daniel Patterson daniel at mapbox.com
Mon Feb 15 22:03:25 UTC 2016


  There's an updated example client here:

    https://github.com/Project-OSRM/osrm-backend/blob/develop/example/ <https://github.com/Project-OSRM/osrm-backend/blob/develop/example/>

  If you look inside the "route_summary" member of the JSON response, you'll find both the "total_time" and "total_distance" sub members, which sound like the values you want.  The new example shows how to easily access these.


> On Feb 15, 2016, at 1:52 PM, James Grant <james at grantzone.net> wrote:
> Hi there.
> I'm building some code based heavily around the "simpleclient.cpp" example in the tools section of the source code. I'm trying to simply extract the driving distance and time from the returned JSON object. 
> This could be achieved by taking the object returned and manipulating it which seems wasteful, or I could amend the code such that is purely returned the required information. If the latter isn't realistic, then using the existing JSON handler, how could I extract information from the JSON object?
> Cheers
> _______________________________________________
> 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/20160215/6f153124/attachment.html>

More information about the OSRM-talk mailing list