忽略超过 20 吨卡车的限制

Ignore restrictions for truck over 20 ton

我使用相同的请求http://fleet.api.here.com/2/calculateroute.json?app_id={app_id}&app_code={app_code}&mode=truck;fastest;traffic:disabled&language=en-GB&representation=overview&metricSystem=metric&routeattributes=wp,sc,sm,sh,bb,lg,no,shape&legattributes=wp,mn,li,le,tt&maneuverattributes=po,sh,tt,le,ti,li,pt,pl,rn,nr,di&linkattributes=sh,le,sl,ds,tr&trailersCount=0&alternatives=0&currency=EUR&trailerType=2&vehicleNumberAxles=2&trailerNumberAxles=3&hybrid=0&height=4m&trailerHeight=400&vehicleWeight=8000&limitedWeight=20t&width=225&length=3&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=1&commercial=1&heightAbove1stAxle=300&fuelType=Diesel&detail=1&rollup=none,country;tollsys&emissionType=5&shippedhazardousgoods=0&waypoint0=geo!41.3260846,2.1408677&waypoint1=geo!41.3566442,2.0946016

如何获取超过20吨货车的规避限制的路线和费用?

感谢帮助。

首先,请使用最新的URL请求。https://fleet.ls.hereapi.com/2/calculateroute.json?apikey={{RESTapiKey}}... 如果你想避开货车的限制,添加参数truckRestrictionPenalty并将值设置为soft

违反卡车限制的路线在响应中用专门的路线和机动注释指出。带有类型违规注释和文本 truckRestriction 的路线可能由您自行负责行驶。在这样的路线上行驶时,必须格外小心,因为这可能会导致车辆或道路基础设施损坏。