Calculate duration for route through ferry
This is a request for a calculation of the travel duration without traffic information for a route that goes through ferry.
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=51.13747,1.33148&'\
'destination=50.96035,1.905025&'\
'return=summary&'\
'transportMode=car&'\
'apiKey=YOUR_API_KEY'{
"routes": [
{
"id": "fe1d3ac8-411e-4b47-bd2a-8056484865ce",
"sections": [
{
"id": "3f104c2d-7ec2-4a63-9e3b-dcf6b9acd251",
"type": "vehicle",
...,
"summary": {
"duration": 541,
"length": 3898,
"baseDuration": 501
},
"transport": {
"mode": "car"
}
},
{
"id": "2239e39b-4eef-4ce0-9988-1c434a1e13a9",
"type": "transit",
"preActions": [
{
"action": "board",
"duration": 1200
}
],
"postActions": [
{
"action": "deboard",
"duration": 600
}
],
...,
"summary": {
"duration": 5449,
"length": 40565
},
"notices": [
{
"title": "No schedule information available.",
"code": "noSchedule",
"severity": "info"
}
],
"transport": {
"mode": "ferry",
"name": "Dover-Calais"
}
},
{
"id": "554714bc-a8c1-406f-8895-d2f81f88722e",
"type": "vehicle",
...,
"summary": {
"duration": 440,
"length": 5273,
"baseDuration": 396
},
"transport": {
"mode": "car"
}
}
]
}
]
}Calculation
The details of the calculation for this request are the following:
Duration without traffic =
first section `baseDuration`
+ second (ferry) section `duration`
+ third section `baseDuration`
= 501s + 5449s + 396s
= 6346s
= 1h45m46s
For more information on ferries, see Use a specific ferry.
Updated last month