在使用计算路线时,我得到的是同一两个地点进出上述地点的不同号码。我会理解,如果是几英里,但我得到的是一个20+英里的差异,这在我看来似乎是错的。
我的问题是:
https://route.api.here.com/routing/7.2/calculateroute.xml?app_id={app-id}&app_code={app-code}&mode=fastest;truck&height=5&waypoint0=geo!41.85071,-87.67896;500&waypoint1=geo!40.76282,-81.34159;500 此查询返回
442英里
如果我换了点:
https://route.api.here.com/routing/7.2/calculateroute.xml?app_id={app-id}&app_code={app-code}&mode=fastest;truck&height=5&waypoint0=geo!40.76282,-81.34159;500&waypoint1=geo!41.85071,-87.67896;500此查询返回
392英里
。
我猜我的查询中遗漏了一些东西,但我似乎不知道是什么东西。任何帮助都将不胜感激。
谢谢!
发布于 2020-02-10 10:20:26
您可以添加参数truckRestrictionPenalty=soft
备注:-软惩罚要求在响应中启用路由注释。
https://route.ls.hereapi.com/routing/7.2/calculateroute.json?apiKey={api_key}&mode=fastest;truck&waypoint0=geo!41.85071,-87.67896;500&waypoint1=geo!40.76282,-81.34159;500&truckRestrictionPenalty=soft&routeattributes=notes&maneuverattributes=notes393英里
https://route.ls.hereapi.com/routing/7.2/calculateroute.json?mode=fastest;truck&waypoint0=geo!40.76282,-81.34159;500&waypoint1=geo!41.85071,-87.67896;500&truckRestrictionPenalty=soft&routeattributes=notes&maneuverattributes=notes&apiKey={api_key}392英里
https://stackoverflow.com/questions/60118399
复制相似问题