タクシーと配車ルートを計算します

ユーザーストーリー

Intermodal Routing API V8 を使用 taxitransit して、アムステルダム市内中心部からアムステルダムスキポール空港までのルートをリクエストします。このルートには、と交通手段の組み合わせが含まれています。 このタクシーを利用 して、モーダル間のルートに乗ることができます。 最寄りの公共交通機関の駅までタクシーで行き、別の交通機関に乗り換え、公共交通機関を利用して目的地に到着します。

リクエスト

認証

モーダル間ルーティングでは、 API キー と Bearer トークンの両方を使用した認証がサポートされます。 はじめにを無料で利用 するには、フリーミアム HERE Developer アカウントを作成して API キー を取得します。 その他の認証方法について は、『 Identity & Access Management 開発者ガイド』を参照してください。

タクシーと配車ルートリクエストを作成しています

GET https://intermodal.router.hereapi.com/v8/routes
    ?destination=52.309584623632894,4.762449758418342
    &origin=52.360292297234395,4.883253423531613
    &taxi[enable]=routeHead
    &taxi[modes]=car
    &transit[enable]=routeTail
    &rented[enable]=
    &apiKey=

モーダル間ルートリクエストの一般的な必須パラメータは origin 、 AND のみ destination<latitude>,<longitude> で、形式で提供されます。 特にタクシーと配車のリクエスト taxi[modes]=cartaxi[enable]=routeHeadtransit[enable]=routeTailrented[enable]= の場合は、パラメーター、、、を設定して、タクシーと配車のモーダル間ルートを応答で確保します。

taxi[modes]=carおよび taxi[enable]=routeHead パラメータは、ルート の head セクションにあるtaxiトランスポートタイプを返すように、モーダル間ルータに指示します。 一方 transit[enable]=routeTail 、このパラメータは、ルート transitのテール セクションにあるトランスポートタイプを返すように、モーダル間ルータに指示します。 rented[enable]=rented このパラメータは、応答の転送タイプを無効にするために必要です。デフォルトでは有効になっています。

デフォルト では、 Intermodal Routing API V8 は最適なルートのみを返します。 オプションのパラメータ alternatives は、最適なルートを除いて戻る代替ルートの数を表します。 デフォルトでは、に設定 alternatives=0されています。

taxi[modes]=carcartaxi 現時点では、トランスポートタイプの唯一のトランスポートモードであるため、パラメータはオプションです。 今後は、などの他のモード shuttle が利用可能になる可能 taxi[modes]=shuttle 性があります。また、応答でのみ戻す場合は、を使用する必要があります。

Intermodal Routing API V8 のサービスおよびトランスポートタイプの詳細については、「 Intermodal サービスおよびトランスポートタイプ」セクションを参照してください。

レスポンス

成功した応答には、計算されたルートに関する次の詳細情報が含まれています。

  • 1 つの最適なルートがセクションに分割されます
  • 各セクションの出発時間と到着時間、所要時間、座標、およびその他のセクションごとの情報
  • セクションごとに、次のいずれかのトランスポートタイプがあります。
    • taxi - 出発地から乗り継ぎ地点までのルートセクション
    • pedestrian - taxi ドロップオフポイントから transit 駅まで徒歩で行くルートセクション
    • transit - 公共交通機関の出発および到着ステーションがあるルートセクション
      • 任意 return=intermediate で、 request パラメーターを設定することで、すべての中間の分岐点を返すことができます。
  • オペレータコード、オペレータ名、オペレータの Web サイトへのリンクなど、サービスを実行するオペレータのセット
{
  "routes": [
    {
      "id": "R003814-C0",
      "sections": [
        {
          "id": "R003814-C0-S0",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:28:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.360292,
                "lng": 4.883253
              }
            }
          },
          "arrival": {
            "time": "2020-04-28T16:29:00+02:00",
            "place": {
              "name": "Amsterdam, Rijksmuseum",
              "type": "station",
              "location": {
                "lat": 52.359768,
                "lng": 4.883548
              },
              "id": "215030307"
            }
          }
        },
        {
          "id": "R003814-C0-S1",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T16:29:00+02:00",
            "place": {
              "name": "Amsterdam, Rijksmuseum",
              "type": "station",
              "location": {
                "lat": 52.359768,
                "lng": 4.883548
              },
              "id": "215030307"
            },
            "delay": 0
          },
          "arrival": {
            "time": "2020-04-28T16:40:00+02:00",
            "place": {
              "name": "Amsterdam, Station Zuid",
              "type": "station",
              "location": {
                "lat": 52.340825,
                "lng": 4.87374
              },
              "id": "215096212",
              "platform": "D"
            },
            "delay": 0
          },
          "transport": {
            "mode": "lightRail",
            "name": "5",
            "category": "Tram",
            "headsign": "Amstelveen Stadshart"
          },
          "agency": {
            "id": "5wUGVB00",
            "name": "GVB",
            "website": "http://www.gvb.nl"
          }
        },
        {
          "id": "R003814-C0-S2",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:40:00+02:00",
            "place": {
              "name": "Amsterdam, Station Zuid",
              "type": "station",
              "location": {
                "lat": 52.340825,
                "lng": 4.87374
              },
              "id": "215096212"
            }
          },
          "arrival": {
            "time": "2020-04-28T16:46:00+02:00",
            "place": {
              "name": "Amsterdam Zuid",
              "type": "station",
              "location": {
                "lat": 52.33882,
                "lng": 4.872866
              },
              "id": "215154261"
            }
          }
        },
        {
          "id": "R003814-C0-S3",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T16:46:00+02:00",
            "place": {
              "name": "Amsterdam Zuid",
              "type": "station",
              "location": {
                "lat": 52.33882,
                "lng": 4.872866
              },
              "id": "215154261",
              "platform": "3"
            }
          },
          "arrival": {
            "time": "2020-04-28T16:52:00+02:00",
            "place": {
              "name": "Schiphol Airport",
              "type": "station",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              },
              "id": "215125100",
              "platform": "4"
            }
          },
          "transport": {
            "mode": "regionalTrain",
            "name": "Intercity",
            "category": "Regional Train",
            "headsign": "Schiphol Airport"
          },
          "agency": {
            "id": "5wUIFF06",
            "name": "NS",
            "website": "http://www.ns.nl"
          }
        },
        {
          "id": "R003814-C0-S4-dep",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:52:00+02:00",
            "place": {
              "name": "Schiphol Airport",
              "type": "station",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              },
              "id": "215125100"
            }
          },
          "arrival": {
            "time": "2020-04-28T16:53:00+02:00",
            "place": {
              "name": "Schiphol",
              "type": "accessPoint",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              }
            }
          }
        },
        {
          "id": "R003814-C0-S4",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:53:00+02:00",
            "place": {
              "name": "Schiphol",
              "type": "accessPoint",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              }
            }
          },
          "arrival": {
            "time": "2020-04-28T16:54:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.309585,
                "lng": 4.76245
              }
            }
          }
        }
      ]
    }
  ]
}

」に一致する結果は 件です

    」に一致する結果はありません