如何在此处地图 api 请求中添加起点和目的地之间的中途停留

How to add the stopover in here map api request between start and destination

我想包括起点和终点之间的中途停留,所以路线应该这样计算 start-->waypoints-->destination.

这是 heremap 的 api 请求:

https://router.hereapi.com/v8/routes?transportMode=car&origin=36.15033,-115.111499&destination=36.155825,-115.145881&via:36.171873,-115.146747&return=summary&apiKey=<apiKey>

但路线只计算始发地和目的地之间的路线,它避免了通过坐标

问题出在你的请求上。

使用via=代替via:

https://router.hereapi.com/v8/routes?transportMode=car&origin=36.15033,-115.111499&via=36.171873,-115.146747&destination=36.155825,-115.145881&return=summary,polyline&apiKey=