微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 https://route.api.here.com/routing/7.2/calculateroute.json 中设置出发日期时间不起作用?

如何解决在 https://route.api.here.com/routing/7.2/calculateroute.json 中设置出发日期时间不起作用?

我正在尝试使用 HERE 计算路线服务进行卡车路线安排。我需要计算预计到达时间。根据我的理解,如果我只是在请求中添加离开 =“2020-03-10T17:00:00+02”或“现在”,这应该可以工作。但是,如果我添加它,我会得到与没有固定出发时间的请求相同的结果。我希望在响应中看到出发和到达时间,但它们不在那里。

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,indices,baseTime,trafficTime,summary&linkattributes=consumption,dynamicSpeedInfo,flags,functionalClass,maneuver,nextLink,nextStopName,publicTransportLine,remaindistance,remainTime,roadName,roadNumber,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,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'

根据文档,我的请求似乎没问题:https://developer.here.com/documentation/routing/dev_guide/topics/resource-calculate-route.html

我还发现它适用于较新的路由 API v8 (8.20.3)。但是由于无法同时获取链接 ID(我认为?)我需要使用 v7.2。

我做错了什么吗?

解决方法

默认情况下,如果你不放任何东西,那就是现在。例如,您可以比较离开=现在与离开=2021-03-19T08:23:05Z,然后您会看到交通时间和基准时间之间的差异。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。