Powered by Zoomin Software. For more details please contactZoomin

HERE Routing API v8 - Developer Guide

Product category
Technology
Doc type
Version
Product lifecycle
This publication

HERE Routing API v8 - Developer Guide: Get instructions

Table of Contents

Get instructions

To obtain structured information about the actions needed to complete the route, specify return=polyline,actions when requesting a route. This may be useful when providing user interface elements such as the position or icon for an action.

You can specify return=polyline,actions,instructions to include instructions action when requesting the route. Instructions provide a textual description of the action that is appropriate for end users.

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
            }
          ],
          ...
        }
      ]
    }
  ]
}

Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert