ガイドAPIリファレンス
ガイド

トラックの経由地シーケンスのリクエスト方法

ディスパッチャーは、ドイツのヴィースバーデン中央駅からマインツ中央駅まで移動する際に、フランクフルト、ダルムシュタット、ハナウの中央駅を経由して最短ルートを見つける必要があります。

HERE Waypoints Sequence API v8へのリクエストを使用すると、トラックが可能な限り最短距離で移動できるように、目的地を訪問する最適な順序を判断できます。

この計算で使用するトラックは重量18tで、トレーラーを牽引しています。車高は4 m、幅は2.5 m、全長は18.35 mです。

リクエスト

curl -H "Authorization: Bearer BEARER_TOKEN" "https://wps.hereapi.com/v8/findsequence2?start=WiesbadenCentralStation;50.0715,8.2434&destination1=FranfurtCentralStation;50.1073,8.6647&destination2=DarmstadtCentralStation;49.8728,8.6326&destination3=HanauCentralStation;50.1218,8.9298&end=MainzCentralStation;50.0021,8.259&improveFor=distance&mode=fastest;truck;traffic:disabled;&hasTrailer=true&limitedWeight=18&height=4.00&width=2.50&length=18.35"

レスポンス

{
  "results": [
    {
      "waypoints": [
        {
          "id": "WiesbadenCentralStation",
          "lat": 50.0715,
          "lng": 8.2434,
          "sequence": 0,
          "estimatedArrival": null,
          "estimatedDeparture": null,
          "fulfilledConstraints": []
        },
        {
          "id": "FranfurtCentralStation",
          "lat": 50.1073,
          "lng": 8.6647,
          "sequence": 1,
          "estimatedArrival": null,
          "estimatedDeparture": null,
          "fulfilledConstraints": []
        },
        {
          "id": "HanauCentralStation",
          "lat": 50.1218,
          "lng": 8.9298,
          "sequence": 2,
          "estimatedArrival": null,
          "estimatedDeparture": null,
          "fulfilledConstraints": []
        },
        {
          "id": "DarmstadtCentralStation",
          "lat": 49.8728,
          "lng": 8.6326,
          "sequence": 3,
          "estimatedArrival": null,
          "estimatedDeparture": null,
          "fulfilledConstraints": []
        },
        {
          "id": "MainzCentralStation",
          "lat": 50.0021,
          "lng": 8.259,
          "sequence": 4,
          "estimatedArrival": null,
          "estimatedDeparture": null,
          "fulfilledConstraints": []
        }
      ],
      "distance": "159694",
      "time": "8769",
      "interconnections": [
        {
          "fromWaypoint": "WiesbadenCentralStation",
          "toWaypoint": "FranfurtCentralStation",
          "distance": 36583,
          "time": 1846,
          "rest": 0,
          "waiting": 0
        },
        {
          "fromWaypoint": "FranfurtCentralStation",
          "toWaypoint": "HanauCentralStation",
          "distance": 34636,
          "time": 1917,
          "rest": 0,
          "waiting": 0
        },
        {
          "fromWaypoint": "HanauCentralStation",
          "toWaypoint": "DarmstadtCentralStation",
          "distance": 49221,
          "time": 2614,
          "rest": 0,
          "waiting": 0
        },
        {
          "fromWaypoint": "DarmstadtCentralStation",
          "toWaypoint": "MainzCentralStation",
          "distance": 39254,
          "time": 2392,
          "rest": 0,
          "waiting": 0
        }
      ],
      "description": "Targeted best distance; without traffic",
      "timeBreakdown": {
        "driving": 8769,
        "service": 0,
        "rest": 0,
        "waiting": 0,
        "break": 0
      }
    }
  ],
  "errors": [],
  "processingTimeDesc": "129ms",
  "responseCode": "200",
  "warnings": null,
  "requestId": "f12b6053-612b-460a-8e86-e5fccf88016d"
}