名前と場所でステーションを検索します

ユーザーストーリー

現在の地理的位置から一定の距離内にあり、その名前が特定のステーション名と完全または部分的に一致するステーションを検索する場合。

リクエスト

1 つの GET リクエストでステーションを検索します。 唯一の必須パラメータ inは、フォーム<latitude>,<longitude>内の WGS84 座標のペアとして定義されている検索領域の中心を指定します。 オプションのパラメータ r で、検索範囲の半径をメートル単位で指定します。 デフォルトでは、 r=500です。 name パラメータは、検索するステーション名または名前の一部です。 スペースで区切られた 1 つ以上の単語で構成されます。 次のリクエストで 500 は、ユーザーの場所からメートル以内にあり、名前にが含まれているステーションを検索します cinquecento

GET https://transit.hereapi.com/v8/stations
    ?in=41.90123,12.50091
    &name=termini
Authorization: Bearer 

現在使用可能な認証方法の詳細について は、『 Identity & Access Management 開発者ガイド』を参照してください。

レスポンス

リクエストに対する応答には、次の情報ブロックが含まれています。

  • 1 つのクエリーでは、最大 25 のステーション ID を使用できます。
  • stations 応答オブジェクトの各ステーション要素には、次の上位レベルの要素が含まれています。
    • place 名前、場所、 ID 、タイプなどのステーション / ストップ情報を使用します。
    • transports 駅にサービスを提供しているトランスポートに関する情報が表示されます。 return=transport リクエストを追加して有効化します。
    • accessPoints 駅 / 停留所へのアクセスに使用されるポイントに関する情報が表示されます。
{
  "stations": [
    {
      "place": {
        "name": "Termini (MA-MB-FS)",
        "type": "station",
        "location": {
          "lat": 41.901125,
          "lng": 12.50042
        },
        "id": "415710072"
      }
    },
    {
      "place": {
        "name": "Roma Termini",
        "type": "station",
        "location": {
          "lat": 41.900503,
          "lng": 12.502027
        },
        "id": "722068214"
      }
    },
    {
      "place": {
        "name": "Termini (MA-MB-FS)",
        "type": "station",
        "location": {
          "lat": 41.900662,
          "lng": 12.500125
        },
        "id": "415712166"
      }
    },
    {
      "place": {
        "name": "Termini",
        "type": "station",
        "location": {
          "lat": 41.900965,
          "lng": 12.499871
        },
        "id": "415712552"
      }
    },
    {
      "place": {
        "name": "De Nicola/Termini",
        "type": "station",
        "location": {
          "lat": 41.902722,
          "lng": 12.499617
        },
        "id": "415703293"
      },
      "accessPoints": [
        {
          "location": {
            "lat": 41.901298,
            "lng": 12.500427
          },
          "name": "West Entrance",
          "type": "accessPoint"
        },
        {
          "location": {
            "lat": 41.901299,
            "lng": 12.500429
          },
          "name": "Piazza Mall",
          "type": "accessPoint"
        }
      ]
    }
  ]
}

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

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