使用出发或大中途停留时对路线计算产生不良反应

Getting bad response on route calculation when using departure or large stopover

执行此请求时:

https://fleet.api.here.com/2/calculateroute.json?app_id=[my-app_id]&mode=fastest;truck;traffic:enabled;&currency=EUR&restTimes=EU&traverseGates=true&tollVehicleType=3&legAttributes=none,li,-mn&rollups=none,country&departure=2019-10-24T12:00:00&waypoint0=stopOver,3600!geo!40.6457299,-7.8720095&waypoint1=stopOver,3600!geo!40.538969,-7.855085&waypoint2=stopOver,3600!geo!40.3636881,-8.0241749&waypoint3=stopOver,3600!geo!38.7222524,-9.1393366&waypoint4=geo!37.0193548,-7.9304397

我收到错误消息:

{
  "issues": [
    {
      "message": "Couldn't reach way point 4 due to search timeout (start links -537276209 -746448836 1213280170 -537276209 -746448836 1213280170 -537276209 -537276209 1213280170 -746448836 -746448836 -746448836 1213280170 -537276209 1213280170 -537276209 -746448836 -746448836 1213280170 -537276209 -537276209 1213280170 -537276209 1213280170 -746448836 -537276209 1213280170 -746448836 -746448836 -537276209 1213280170 -746448836 1213280170 -537276209  dest links 545917165 -545917165 )"
    },
    {
      "message": "Request id: bca15488-a510-41d7-a1e0-90c60d045bc5"
    }
  ],
  "response": null,
  "error_id": "bca15488-a510-41d7-a1e0-90c60d045bc5",
  "response_code": "400 Bad Request"
}

但是,如果我删除出发字段或设置较低的中途停留点,它会起作用,但我需要两个字段都具有这些值。

waypoints的最大数量是有限的。但是,此限制不是固定数字,而是总处理时间限制的结果。当搜索到达第 4 个航路点时,API 的执行时间结束。这是为此 API 搜索超时限制配置的内容。

不过,通过减少一站停留,效果很好。您可以将这两个结果结合起来。会提给开发者看是否可以延长执行时限。