I’m just starting out in the playground and sending some initial API requests calculating routes.
Example Route Request
How can I get the “travel time” which is posted on the website. Here are example directions:
I would like the output of:
Distance: 4.6km. Time: 0:12
just to clarify: the second example is not our website but OpenStreetMap using OSRM routing.
In the playground the time shows if you hover across the route geometry or you switch to the Code tab (<>) in
properties.summary. You then still would have to format it yourself.
But the api is for software development and similar purpose.
If you only want to calculate routes try on of our clients:
Hello @amandus for that information.
How can I use the OpenRouteService API to get travel time?
You need to extract it programatically from the JSON response object.
It is in
features.properties.summary.duration of the response.
The value is in seconds.
In the playground you can only look at it.
If you want to use it you need to send the request inside some application or script and then use the above value and format it to your desired output.
That said, this has nothing to do with ORS itself.
Please use a search engine and look how to do that.
We can’t provide basic programming support here.
I’m not asking for basic programming support.
I’m asking where the item is found.
I’m using the PlayGround website to test api results