我如何在此处获得没有轮渡公里的路线距离 API

How can i get the route distance without the ferry km in HERE API

我想获取排除轮渡公里数的路线距离。

目前我正在使用以下请求:

https://tce.cit.api.here.com/2/calculateroute.json?
mode=fastest;truck;traffic:disabled&
truckType=tractorTruck&
maneuverAttributes=none&
combineChange=true&
routeAttributes=none,wp,sm,sh,no&
linkAttributes=none&
legAttributes=none&
detail=1&
alternatives=2&
rollup=total,country&
jsonattributes=41&
waypoint0=geo!stopOver!51.006511,2.321095&
waypoint1=geo!stopOver!51.137062,0.911495

此请求给出了 128.81 公里,但没有渡轮,距离不到 100 公里。

提前谢谢你。

没有为您提供此值的直接属性或字段。但是,您可以通过使用以下查询来获取此信息,其中 link 信息为 provided.Every link 具有标志。您可以搜索您感兴趣的标志(在您的情况下为 railFerry),然后将它们的 lengths.This 相加,即可得出您的路线距离中的轮渡长度。

https://route.cit.api.here.com/routing/7.2/calculateroute.json?waypoint0=geo!stopOver!51.006511,2.321095&waypoint1=geo!stopOver!51.137062,0.911495&mode=fastest%3Bcar%3Btraffic%3Aenabled&app_id=xxx&app_code=yyy&representation=linkPaging&language=de-de&returnElevation=true&maneuverAttributes=position%2Clength%2CtravelTime%2CstartAngle&instructionFormat=text&routeAttributes=waypoints%2Csummary