计算起点和终点之间的路线时,我想避开高速公路。
https://router.hereapi.com/v8/routes?transportMode=car&motorway:-1&origin=52.120066,11.570918&destination=52.282376,6.687846&return=travelsummary,polyline&apikey=<key>
但上面的查询没有用,没有避开高速公路。
参考文档。https:/developer.here.comdocumentationroutingdev_guidetopicsresource-param-type-routing-mode.html。
我已经检查了他们的可能性的路线,以避免高速公路。
https:/www.google.commapsdir'52.120066,11.570918''52.282376,6.687846'@52.3407684,7.9868359,8zdata=!3m1!4b1!4m12!4m11!1m3!2m2!1d11.570918!2d52.120066!1m3!2m2!1d6.687846!2d52.282376!2m1!1b1!3e0。
根据 路由v8文件 避开所有高速公路的正确参数是 avoid[features]=controlledAccessHighway
而不是 motorway:-1
https://router.hereapi.com/v8/routes?transportMode=car&avoid[features]=controlledAccessHighway&origin=52.120066,11.570918&destination=52.282376,6.687846&return=travelsummary,polyline&apikey=..
注:可能更好的使用价值是 tollRoad
因为它允许高速公路不收费(如德国)。