如何避开 Here 地图 API 查询中的高速公路
How to avoid the motorway road in Here map API query
我想在计算起点和目的地之间的路线时避开高速公路
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://www.google.com/maps/dir/'52.120066,11.570918'/'52.282376,6.687846'/@52.3407684,7.9868359,8z/data=!3m1!4b1!4m12!4m11!1m3!2m2!1d11.570918!2d52。 120066!1m3!2m2!1d6.687846!2d52.282376!2m1!1b1!3e0
根据 Routing v8 documentation,避开所有高速公路的正确参数是 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
,因为它允许高速公路不收费(例如在德国)
我想在计算起点和目的地之间的路线时避开高速公路
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://www.google.com/maps/dir/'52.120066,11.570918'/'52.282376,6.687846'/@52.3407684,7.9868359,8z/data=!3m1!4b1!4m12!4m11!1m3!2m2!1d11.570918!2d52。 120066!1m3!2m2!1d6.687846!2d52.282376!2m1!1b1!3e0
根据 Routing v8 documentation,避开所有高速公路的正确参数是 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
,因为它允许高速公路不收费(例如在德国)