Route Via Intermediate Waypoint

For a detour from the best route, specify the via parameter in your request.

via accepts a list of coordinates. The resulting route looks as follows:

  1. from the origin to the first via
  2. to any subsequent via coordinates in the requested order
  3. the last via coordinate until the destination

Example

curl -X GET \
  'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5323,13.3789&via=52.534336,13.371154'
{
    "routes": [
        {
            "id": "9cef474a-52eb-4216-8f8a-b36a01267c81",
            "sections": [
                {
                    "arrival": {
                        "place": {
                            "location": {
                                "lat": 52.534305257722735,
                                "lng": 13.371185269206762
                            },
                            "type": "place",
                            "waypoint": 1
                        },
                        "time": "2019-12-09T11:40:07+01:00"
                    },
                    "departure": {
                        "place": {
                            "location": {
                                "lat": 52.53098367713392,
                                "lng": 13.384566977620125
                            },
                            "type": "place"
                        },
                        "time": "2019-12-09T11:35:51+01:00"
                    },
                    "id": "e69c7d40-9cb5-4f6c-8542-30f1d4162894",
                    "transport": {
                        "mode": "car"
                    },
                    "type": "vehicle"
                },
                {
                    "arrival": {
                        "place": {
                            "location": {
                                "lat": 52.53232637420297,
                                "lng": 13.378873988986015
                            },
                            "type": "place"
                        },
                        "time": "2019-12-09T11:43:00+01:00"
                    },
                    "departure": {
                        "place": {
                            "location": {
                                "lat": 52.534305257722735,
                                "lng": 13.371185269206762
                            },
                            "type": "place",
                            "waypoint": 1
                        },
                        "time": "2019-12-09T11:40:07+01:00"
                    },
                    "id": "b814fe18-24c1-4936-a14a-a5268cdab502",
                    "transport": {
                        "mode": "car"
                    },
                    "type": "vehicle"
                }
            ]
        }
    ]
}

results matching ""

    No results matching ""