航点头仅在第一个航点上起作用

问题描述 投票:0回答:1

我正在尝试获得一条遵循航路点提供的航向信息的路线。似乎只有第一个航路点的航向会影响路线的几何形状。

例如:

"https://route.api.here.com/routing/7.2/calculateroute.json" \
"?app_id=xxxx&app_code=xxxx" \
"&waypoint0=geo!49.010830,8.417029;;;90" \
"&waypoint1=passThrough!49.011843,8.418113;;;180" \
"&waypoint2=geo!49.010020,8.419840;;;240" \
"&mode=shortest;car;traffic:disabled" \
"&routeattributes=wp,sm,sh"

screenshot of the result

返回一条路线,第二条航路点从南到北,即使相反。最后一个航路点也是如此。仅当更改第一个标题时,路线的几何形状才会更改。

矩阵请求也是如此。仅起点的方向会影响距离。

我已经看到了可能的解决方案here,但是这使事情变得复杂,因为我应该为数百个航路点发出路线请求,因此无法手动检查所有前缀。

可以使用路由API解决我的问题吗?还是我需要其他API?

here-api direction heading
1个回答
0
投票

180度转弯用于stopOver,但不允许passThrough。

enter image description here

 var router = platform.getRoutingService(),
    routeRequestParams = {
      mode: 'shortest;car;traffic:disabled',
      representation: 'display',
      routeattributes : 'waypoints,summary,shape,legs',
      maneuverattributes: 'direction,action',
      waypoint0: 'geo!49.010830,8.417029;;;90', // Brandenburg Gate
      waypoint1: 'stopOver!49.011843,8.418113;;;180',  // Friedrichstraße Railway Station
      waypoint2: 'geo!49.010020,8.419840;;;240'
    };
© www.soinside.com 2019 - 2024. All rights reserved.