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

表示に関する指示

ルートを完了するために必要なアクションに関する構造化された情報を取得するには、ルートをリクエストするときにreturn=polyline,actionsを指定します。 これは、アクションの位置やアイコンなどのユーザー インターフェース要素を指定する場合に便利です。

return=polyline,actions,instructions を指定すると、ルートをリクエストするときに指示アクションを含めることができます。 指示には、エンド ユーザーに適したアクションの説明がテキストで示されます。

curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'transportMode=car&'\
'origin=52.5308,13.3847&'\
'destination=52.5323,13.3789&'\
'return=polyline,actions,instructions&'\
'apiKey=YOUR_API_KEY'
{
  "routes": [
    {
      "id": "054ea907-d02b-4b77-b1b4-2af511291eaf",
      "sections": [
        {
          "actions": [
            {
              "action": "depart",
              "duration": 18,
              "instruction": "Head toward Chausseestraße on Invalidenstraße. Go for 113 m.",
              "offset": 0
            },
            {
              "action": "turn",
              "duration": 53,
              "instruction": "Turn right onto Chausseestraße. Go for 320 m.",
              "offset": 8
            },
            {
              "action": "turn",
              "duration": 15,
              "instruction": "Turn left onto Habersaathstraße. Go for 105 m.",
              "offset": 27
            },
            {
              "action": "arrive",
              "duration": 0,
              "instruction": "Arrive at Habersaathstraße. Your destination is on the left.",
              "offset": 33
            }
          ],
          ...
        }
      ]
    }
  ]
}