Route handle

A route handle encodes a path from a previously calculated route. It can be used to compactly cache a route for a brief amount of time. Thus, it can be used to retrieve more data along the route and get updated traffic information.

However, it does not store the route data itself, meaning that it can not be used to retrieve exactly the same traffic data.

Take a look at Basic Route Handle Usage for some simple examples of the route handle API. And Update Route Handle for how to use the origin parameter to get an updated route and route handle.

Validity

A route handle encodes a path tightly coupled to the underlying map data. There are roughly 3 scenarios that can invalidate an existing handle:

  1. The encoding and/or decoding method changes, invalidating all existing handles on a new release. This happens rarely.
  2. The topology of the map data changes, invalidating all handles being affected. These can be changes in the real world and virtual changes like roads being split into multi-digitized roads. This happens rarely.
  3. The attribution of segments changes, requiring their service internal representation to change. All handles containing these segments on their path are affected. This happens more frequently.

Note that regardless of the frequency of these changes invalidating some or all route handles, a user should always be prepared to handle failures. A simple procedure to handle these failures would be to recalculate the route to retrieve a new (valid) route handle.

Parameters

Parameters used to calculate the route are not encoded in the route handle, so they should be specified again when recreating a route using routeHandle.

For example, the transportMode parameter does not have to match the transport mode previously used for route calculation. However, when using a different transport mode, the request may fail, e.g. when the route has road segments forbidden for the provided transport mode.

EV Parameters

The route handle endpoint supports all electric vehicle (EV) parameters that are used to calculate the route with the exception of the following:

  • makeReachable,
  • preferredBrands.

results matching ""

    No results matching ""