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 -X GET \
  'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5323,13.3789&return=polyline,actions,instructions'
{
  "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
            }
          ],
          "arrival": {
            "place": {
              "location": {
                "lat": 52.53232637420297,
                "lng": 13.378873988986016
              },
              "type": "place"
            },
            "time": "2019-12-09T11:59:29+01:00"
          },
          "departure": {
            "place": {
              "location": {
                "lat": 52.53098367713392,
                "lng": 13.384566977620125
              },
              "type": "place"
            },
            "time": "2019-12-09T11:58:03+01:00"
          },
          "id": "05f1eb34-0d90-488e-ae99-7e4ce384c1e3",
          "polyline": "BGwynmkDu39wZvBtFAA3InfAAvHrdAAvHvbAAoGzF0FnGoGvHsOvRAA8L3NAAkSnVAAoGjIsEzFAAgFvHkDrJAAwHrJoVvb0ezoBAAjInVAA3N_iBAAzJ_Z",
          "transport": {
            "mode": "car"
          },
          "type": "vehicle"
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""