Begin Route At Different Times

The default departure time for a route is the time of the route request. In your request for a route, you can use the departureTime parameter to specify a different time.

A different departureTime will have various effects ranging from different traffic impact to road closures.

If you specify departureTime as any, the route calculation will not take traffic flow and other time-dependent effects into account. This can be useful when it is not certain that you're taking this route at a fixed time.

Example at Fixed Time

curl -X GET \
  'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5323,13.3789&return=summary&departureTime=2019-10-02T17:00:00'
{
    "routes": [
        {
            "id": "c133d37d-8a43-45ad-a3e2-851d0d4cf792",
            "sections": [
                {
                    "arrival": {
                        "place": {
                            "location": {
                                "lat": 52.53232637420297,
                                "lng": 13.378873988986015
                            },
                            "type": "place"
                        },
                        "time": "2019-10-02T16:01:29+01:00"
                    },
                    "departure": {
                        "place": {
                            "location": {
                                "lat": 52.53098367713392,
                                "lng": 13.384566977620125
                            },
                            "type": "place"
                        },
                        "time": "2019-10-02T16:00:00+01:00"
                    },
                    "id": "0eb54d20-6c9b-4a40-be6a-de36de9330c7",
                    "summary": {
                        "duration": 89,
                        "length": 538
                    },
                    "transport": {
                        "mode": "car"
                    },
                    "type": "vehicle"
                }
            ]
        }
    ]
}

Example at Any Time

curl -X GET \
  'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5323,13.3789&return=summary&departureTime=any'
{
    "routes": [
        {
            "id": "a16f8848-7a20-4851-9c4a-f13d36ace433",
            "sections": [
                {
                    "arrival": {
                        "place": {
                            "location": {
                                "lat": 52.53232637420297,
                                "lng": 13.378873988986015
                            },
                            "type": "place"
                        }
                    },
                    "departure": {
                        "place": {
                            "location": {
                                "lat": 52.53098367713392,
                                "lng": 13.384566977620125
                            },
                            "type": "place"
                        }
                    },
                    "id": "f4516966-c8b9-4098-974d-8ed1c46d2293",
                    "summary": {
                        "duration": 81,
                        "length": 538
                    },
                    "transport": {
                        "mode": "car"
                    },
                    "type": "vehicle"
                }
            ]
        }
    ]
}

results matching ""

    No results matching ""