Get Route
getroute
resource to request a previously calculated route by providing the RouteId
. ../routing/7.2/getroute.{format}?routeId=<ROUTEID>&<parameter>=<value>...
Parameter | Description |
---|---|
apiKey | A 43-byte Base64 URL-safe encoded string used for the authentication of the client application. As a logged in user, you can generate it at https://developer.here.com/projects. API Keys never expire but you can invalidate your API Keys at any time. You cannot have more than two API Keys for one app at the same time. You must include an |
app_id | A 20 bytes Base64 URL-safe encoded string used for the authentication of the client application. If you use the app ID/app code option, you need to include an |
app_code | A 20 bytes Base64 URL-safe encoded string used for the authentication of the client application. If you use the app ID/app code option, you need to include an |
waypoint | List of waypoints that define a route. The first element marks the startpoint, the last the endpoint. Waypoints in between are interpreted as via points. See also WaypointParameterType |
requestId | Clients may pass in an arbitrary string to trace request processing through the system. The RequestId is mirrored in the MetaInfo element of the response structure. |
routeId | Route identifier for which the detailed route information is being requested. |
mode | The routing mode determines how the route is calculated. When used in a See also RoutingModeType Type;TransportModes;TrafficMode;Feature |
departure | Time when travel is expected to start. Traffic speed and incidents are taken into account when calculating the route, where applicable (note that in case of a past departure time the historical traffic is limited to one year). You can use now to specify the current time. Specify either departure or arrival , not both. Type: xs:dateTime . When the optional timezone offset is not specified time is assumed to be local. |
metricSystem | Defines the measurement system used in instruction text. When imperial is selected, units used are based on the language specified in the request. Defaults to metric when not specified. xs:string. Enum [imperial | metric ] |
viewBounds | If the view bounds are given in the request then only route shape points which fit into these bounds will be returned. The route shape beyond the view bounds is reduced to the points which are referenced by links, legs or maneuvers. A common use case for this is the drag and drop scenario where the client is only interested in a rough visual update of the route in the currently visible bounds. See also BoundingBox. |
generalizationTolerances | Specifies the desired tolerances for generalizations of the base route geometry. Tolerances are given in degrees of longitude or latitude on a spherical approximation of the Earth. One meter is approximately equal to 0:00001 degrees at typical latitudes. Type: xs:list of xs:double . |
instructionFormat | Defines the representation format of the maneuver's instruction text. InstructionFormatType instructionformat =Enum [ text | html ] |
language | A list of languages for all textual information, the first supported language is used. If there are no matching supported languages the response is an error. Defaults to en-us. See Languages for a list of supported languages. |
jsonAttributes | Flag to control JSON output. Combine parameters by adding their values. See also JSON Representation. |
jsonCallback | Name of a user-defined function used to wrap the JSON response. |
| Define which elements are included in the response as part of the data representation of the route. See also RouteRepresentationModeType. Enum [ |
| Define which attributes are included in the response as part of the data representation of the route. Defaults to Enum [ |
| Define which attributes are included in the response as part of the data representation of the route maneuvers. Defaults to Enum [ |
| Define which attributes are included in the response as part of the data representation of the route links. Defaults to Enum [ |
| Define which attributes are included in the response as part of the data representation of the route legs. Defaults to Enum [ |
returnElevation | If set to true, all shapes inside routing response will consist of 3 values instead of 2. Third value will be elevation. If there are no elevation data available for given shape point, elevation will be interpolated from surrounding points. In case there is no elevation data available for any of the shape points, elevation will be 0.0. If |
Examples
routeId
is not a permanent identifier it can change with the map version. If the example getroute
request is failing, then the below exampled calculate route request needs to be recalculated to acquire a fresh and valid routeId
. The routeId
parameter should be then replaced by the new one in the example getroute
request. Recalculation
https://route.ls.hereapi.com/routing/7.2/getroute.xml
?apiKey={YOUR_API_KEY}
&routeId=<YOUR_ROUTE_ID>
&mode=fastest;car
&maneuverattributes=position,link
&linkattributes=shape,DynamicSpeedInfo
&requestid=<YOUR_TRACKING_ID>