Reputation: 133
I'm trying to do truck routing using the HERE calculateroute service. I need to calculate the estimated arrival time. From my understanding this should work if I simply add departure="2020-03-10T17:00:00+02" or "now" to the request. However, if I add this I get the same result as with a request that does not have a fixed departure time. I'd expect to see a departure- and arrival time in the response but they're not there.
curl -X GET 'https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=50.16193,8.53361&waypoint1=50.11208,8.68342&jsonAttributes=1&alternatives=1&routeattributes=waypoints,summary,summaryByCountry,shape,boundingBox,legs,notes,lines,routeId,groups,tickets,incidents,zones&legattributes=waypoint,maneuvers,links,length,travelTime,shape,indices,boundingBox,baseTime,trafficTime,summary&linkattributes=consumption,dynamicSpeedInfo,flags,functionalClass,indices,length,maneuver,nextLink,nextStopName,publicTransportLine,remainDistance,remainTime,roadName,roadNumber,shape,speedLimit,timeDependentRestriction,timezone,truckRestrictions&instructionformat=text&app_id={app_id}&app_code={app_code}&mode=fastest;truck;traffic:enabled&truckType=truck&trailersCount=0&axleCount=2&limitedWeight=20&height=4&width=2.5&length=10&truckRestrictionPenalty=strict&departure=now'
curl -X GET 'https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=50.16193,8.53361&waypoint1=50.11208,8.68342&jsonAttributes=1&alternatives=1&routeattributes=waypoints,summary,summaryByCountry,shape,boundingBox,legs,notes,lines,routeId,groups,tickets,incidents,zones&legattributes=waypoint,maneuvers,links,length,travelTime,shape,indices,boundingBox,baseTime,trafficTime,summary&linkattributes=consumption,dynamicSpeedInfo,flags,functionalClass,indices,length,maneuver,nextLink,nextStopName,publicTransportLine,remainDistance,remainTime,roadName,roadNumber,shape,speedLimit,timeDependentRestriction,timezone,truckRestrictions&instructionformat=text&app_id={app_id}&app_code={app_code}&mode=fastest;truck;traffic:enabled&truckType=truck&trailersCount=0&axleCount=2&limitedWeight=20&height=4&width=2.5&length=10&truckRestrictionPenalty=strict'
According to the documentation my request seems to be fine: https://developer.here.com/documentation/routing/dev_guide/topics/resource-calculate-route.html
I also found out that it works with the newer routing API v8 (8.20.3). But since there's no way to also get the link ids (I think?) I need to use v7.2.
Am I doing anything wrong?
Upvotes: 0
Views: 138
Reputation:
By default if you don't put anything it's now. For example you can compare departure=now vs departure=2021-03-19T08:23:05Z then you will see the different between traffic time and maybe basetime as well.
Upvotes: 0