Route - Get Route Directions
Use to calculate a route between a specified origin and destination, passing through any specified waypoints.
The Get Route Directions
API is an HTTP GET
request that returns a route between an origin and a destination, passing through waypoints if specified. The route takes into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day.
Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected.
Routing service provides a set of parameters for a detailed description of a vehicle-specific consumption model. For more information, see Consumption Model.
GET https://atlas.microsoft.com/route/directions/{format}?api-version=1.0&query={query}
GET https://atlas.microsoft.com/route/directions/{format}?api-version=1.0&query={query}&maxAlternatives={maxAlternatives}&alternativeType={alternativeType}&minDeviationDistance={minDeviationDistance}&arriveAt={arriveAt}&departAt={departAt}&minDeviationTime={minDeviationTime}&instructionsType={instructionsType}&language={language}&computeBestOrder={computeBestOrder}&routeRepresentation={routeRepresentation}&computeTravelTimeFor={computeTravelTimeFor}&vehicleHeading={vehicleHeading}&report=effectiveSettings§ionType={sectionType}&vehicleAxleWeight={vehicleAxleWeight}&vehicleWidth={vehicleWidth}&vehicleHeight={vehicleHeight}&vehicleLength={vehicleLength}&vehicleMaxSpeed={vehicleMaxSpeed}&vehicleWeight={vehicleWeight}&vehicleCommercial={vehicleCommercial}&windingness={windingness}&hilliness={hilliness}&travelMode={travelMode}&avoid={avoid}&traffic={traffic}&routeType={routeType}&vehicleLoadType={vehicleLoadType}&vehicleEngineType={vehicleEngineType}&constantSpeedConsumptionInLitersPerHundredkm={constantSpeedConsumptionInLitersPerHundredkm}¤tFuelInLiters={currentFuelInLiters}&auxiliaryPowerInLitersPerHour={auxiliaryPowerInLitersPerHour}&fuelEnergyDensityInMJoulesPerLiter={fuelEnergyDensityInMJoulesPerLiter}&accelerationEfficiency={accelerationEfficiency}&decelerationEfficiency={decelerationEfficiency}&uphillEfficiency={uphillEfficiency}&downhillEfficiency={downhillEfficiency}&constantSpeedConsumptionInkWhPerHundredkm={constantSpeedConsumptionInkWhPerHundredkm}¤tChargeInkWh={currentChargeInkWh}&maxChargeInkWh={maxChargeInkWh}&auxiliaryPowerInkW={auxiliaryPowerInkW}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
format
|
path | True |
Desired format of the response. Value can be either json or xml. |
|
api-version
|
query | True |
string |
Version number of Azure Maps API. |
query
|
query | True |
string |
The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
acceleration
|
query |
number double |
Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates (i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter. Must be paired with decelerationEfficiency. The range of values allowed are 0.0 to 1/decelerationEfficiency. Sensible Values : for Combustion Model : 0.33, for Electric Model : 0.66 |
|
alternative
|
query |
Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
||
arrive
|
query |
string date-time |
The date and time of arrival at the destination point formatted as a Examples:
The |
|
auxiliary
|
query |
number double |
Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW). It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc. Sensible Values : 1.7 |
|
auxiliary
|
query |
number double |
Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour. It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc. Sensible Values : 0.2 |
|
avoid
|
query |
Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In Route Range requests, the value alreadyUsedRoads must not be used. |
||
compute
|
query |
boolean |
Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType shortest. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation none. |
|
compute
|
query |
Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
||
constant
|
query |
string |
Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing. Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates. Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed. The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0. Sensible Values : 50,8.2:130,21.3 This parameter is required for Electric consumption model. |
|
constant
|
query |
string |
Specifies the speed-dependent component of consumption. Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing. Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates. Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed. The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0. Sensible Values : 50,6.3:130,11.5 Note : This parameter is required for The Combustion Consumption Model. |
|
current
|
query |
number double |
Specifies the current electric energy supply in kilowatt hours (kWh). This parameter co-exists with maxChargeInkWh parameter. The range of values allowed are 0.0 to maxChargeInkWh. Sensible Values : 43 |
|
current
|
query |
number double |
Specifies the current supply of fuel in liters. Sensible Values : 55 |
|
deceleration
|
query |
number double |
Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates (i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter. Must be paired with accelerationEfficiency. The range of values allowed are 0.0 to 1/accelerationEfficiency. Sensible Values : for Combustion Model : 0.83, for Electric Model : 0.91 |
|
depart
|
query |
string date-time |
The date and time of departure from the origin point formatted as a
Examples:
The |
|
downhill
|
query |
number double |
Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation (i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter. Must be paired with uphillEfficiency. The range of values allowed are 0.0 to 1/uphillEfficiency. Sensible Values : for Combustion Model : 0.51, for Electric Model : 0.73 |
|
fuel
|
query |
number double |
Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the *Efficiency parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel. This parameter is required if any *Efficiency parameter is set. Sensible Values : 34.2 |
|
hilliness
|
query |
Degree of hilliness for thrilling route. This parameter can only be used in conjunction with |
||
instructions
|
query |
If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none. |
||
language
|
query |
string |
The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the Supported languages section. Default value: en-GB |
|
max
|
query |
integer |
Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
|
max
|
query |
number double |
Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery. This parameter co-exists with currentChargeInkWh parameter. Minimum value has to be greater than or equal to currentChargeInkWh. Sensible Values : 85 |
|
min
|
query |
integer |
All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
|
min
|
query |
integer |
All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
|
|
report
|
query |
Specifies which data should be reported for diagnosis purposes. The only possible value is effectiveSettings. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
||
route
|
query |
Specifies the representation of the set of routes provided as response. |
||
route
|
query |
The type of route requested. |
||
section
|
query |
Specifies which of the section types is reported in the route response. |
||
traffic
|
query |
boolean |
Possible values:
|
|
travel
|
query |
The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. |
||
uphill
|
query |
number double |
Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation (i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter. Must be paired with downhillEfficiency. The range of values allowed are 0.0 to 1/downhillEfficiency. Sensible Values : for Combustion Model : 0.27, for Electric Model : 0.74 |
|
vehicle
|
query |
integer |
Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
|
vehicle
|
query |
boolean |
Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
|
vehicle
|
query |
Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of vehicleEngineType. |
||
vehicle
|
query |
integer |
The directional heading of the vehicle in degrees starting at true North and continuing in clockwise direction. North is 0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees. Possible values 0-359 |
|
vehicle
|
query |
number double |
Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
|
vehicle
|
query |
number double |
Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
|
vehicle
|
query |
Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries/regions. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries/regions. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
||
vehicle
|
query |
integer |
Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways.
|
|
vehicle
|
query |
integer |
Weight of the vehicle in kilograms.
Sensible Values : for Combustion Model : 1600, for Electric Model : 1900 |
|
vehicle
|
query |
number double |
Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
|
windingness
|
query |
Level of turns for thrilling route. This parameter can only be used in conjunction with |
Request Header
Name | Required | Type | Description |
---|---|---|---|
x-ms-client-id |
string |
Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Microsoft Entra ID security in Azure Maps see the following articles for guidance. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
An unexpected error occurred. |
Security
AADToken
These are the Microsoft Entra OAuth 2.0 Flows. When paired with Azure role-based access control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.
To implement scenarios, we recommend viewing authentication concepts. In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.
Notes
- This security definition requires the use of the
x-ms-client-id
header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the Maps management API.
The Authorization URL
is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations.
*
The Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
*
Usage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.
- For more information on Microsoft identity platform, see Microsoft identity platform overview.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
https://atlas.microsoft.com/.default | https://atlas.microsoft.com/.default |
subscription-key
This is a shared key that is provisioned when you Create an Azure Maps account in the Azure portal or using PowerShell, CLI, Azure SDKs, or REST API.
With this key, any application can access all REST API. In other words, this key can be used as a master key in the account that they are issued in.
For publicly exposed applications, our recommendation is to use the confidential client applications approach to access Azure Maps REST APIs so your key can be securely stored.
Type:
apiKey
In:
query
SAS Token
This is a shared access signature token is created from the List SAS operation on the Azure Maps resource through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.
For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the Map account resource to limit rendering abuse and regularly renew the SAS Token.
Type:
apiKey
In:
header
Examples
Successfully retrieve a route between an origin and a destination
Sample request
GET https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=52.50931,13.42936:52.50274,13.43872&report=effectiveSettings
Sample response
{
"formatVersion": "0.0.12",
"routes": [
{
"summary": {
"lengthInMeters": 1147,
"travelTimeInSeconds": 162,
"trafficDelayInSeconds": 0,
"departureTime": "2017-09-07T16:56:58+00:00",
"arrivalTime": "2017-09-07T16:59:40+00:00"
},
"legs": [
{
"summary": {
"lengthInMeters": 1147,
"travelTimeInSeconds": 162,
"trafficDelayInSeconds": 0,
"departureTime": "2017-09-07T16:56:58+00:00",
"arrivalTime": "2017-09-07T16:59:40+00:00"
},
"points": [
{
"latitude": 52.50931,
"longitude": 13.42937
},
{
"latitude": 52.50904,
"longitude": 13.42912
},
{
"latitude": 52.50894,
"longitude": 13.42904
},
{
"latitude": 52.50867,
"longitude": 13.42879
},
{
"latitude": 52.5084,
"longitude": 13.42857
},
{
"latitude": 52.50791,
"longitude": 13.42824
},
{
"latitude": 52.50757,
"longitude": 13.42772
},
{
"latitude": 52.50735,
"longitude": 13.42823
},
{
"latitude": 52.5073,
"longitude": 13.42836
},
{
"latitude": 52.50573,
"longitude": 13.43194
},
{
"latitude": 52.50512,
"longitude": 13.43336
},
{
"latitude": 52.50464,
"longitude": 13.43451
},
{
"latitude": 52.5045,
"longitude": 13.43481
},
{
"latitude": 52.50443,
"longitude": 13.43498
},
{
"latitude": 52.50343,
"longitude": 13.43737
},
{
"latitude": 52.50274,
"longitude": 13.43872
}
]
}
],
"sections": [
{
"startPointIndex": 0,
"endPointIndex": 15,
"sectionType": "TRAVEL_MODE",
"travelMode": "car"
}
]
}
]
}
Definitions
Name | Description |
---|---|
Alternative |
Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
Compute |
Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
Delay |
The magnitude of delay caused by the incident. These values correspond to the values of the response field ty of the Get Traffic Incident Detail API. |
Driving |
Indicates left-hand vs. right-hand side driving at the point of the maneuver. |
Effective |
Effective parameter or data used when calling this Route API. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Guidance |
Type of the instruction, e.g., turn or change of road form. |
Guidance |
A code identifying the maneuver. |
Incline |
Degree of hilliness for thrilling route. This parameter can only be used in conjunction with |
Junction |
The type of the junction where the maneuver takes place. For larger roundabouts, two separate instructions are generated for entering and leaving the roundabout. |
Lat |
A location represented as a latitude and longitude. |
Report |
Specifies which data should be reported for diagnosis purposes. The only possible value is effectiveSettings. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
Response |
Desired format of the response. Value can be either json or xml. |
Response |
Section types of the reported route response |
Response |
Travel mode for the calculated route. The value will be set to |
Route | |
Route |
Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In Route Range requests, the value alreadyUsedRoads must not be used. |
Route |
This object is returned from a successful Route Directions call |
Route |
Contains guidance related elements. This field is present only when guidance was requested and is available. |
Route |
A set of attributes describing a maneuver, e.g. 'Turn right', 'Keep left', 'Take the ferry', 'Take the motorway', 'Arrive'. |
Route |
Groups a sequence of instruction elements which are related to each other. The sequence range is constrained with firstInstructionIndex and lastInstructionIndex. When human-readable text messages are requested for guidance (instructionType=text or tagged), then the instructionGroup has a summary message returned when available. |
Route |
If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none. |
Route |
A description of a part of a route, comprised of a list of points. Each additional waypoint provided in the request will result in an additional leg in the returned route. |
Route |
Summary object for route section. |
Route |
Optimized way point object. |
Route |
Reports the effective settings used in the current call. |
Route |
Specifies the representation of the set of routes provided as response. |
Route |
Route sections contain additional information about parts of a route. Each section contains at least the elements |
Route |
Details of the traffic event, using definitions in the TPEG2-TEC standard. Can contain effectCode and causes elements. |
Route |
The cause of the traffic event. Can contain mainCauseCode and subCauseCode elements. Can be used to define iconography and descriptions. |
Route |
Summary object |
Route |
The type of route requested. |
Section |
Specifies which of the section types is reported in the route response. |
Simple |
Type of the incident. Can currently be JAM, ROAD_WORK, ROAD_CLOSURE, or OTHER. See "tec" for detailed information. |
Travel |
The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. |
Vehicle |
Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of vehicleEngineType. |
Vehicle |
Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries/regions. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries/regions. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
Windingness |
Level of turns for thrilling route. This parameter can only be used in conjunction with |
AlternativeRouteType
Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route.
Name | Type | Description |
---|---|---|
anyRoute |
string |
Allow any alternative route to be returned irrespective of how it compares to the reference route in terms of optimality. |
betterRoute |
string |
Return an alternative route only if it is better than the reference route according to the given planning criteria. |
ComputeTravelTime
Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time.
Name | Type | Description |
---|---|---|
all |
string |
Computes travel times for all types of traffic information and specifies all results in the fields noTrafficTravelTimeInSeconds, historicTrafficTravelTimeInSeconds and liveTrafficIncidentsTravelTimeInSeconds being included in the summaries in the route response. |
none |
string |
Does not compute additional travel times. |
DelayMagnitude
The magnitude of delay caused by the incident. These values correspond to the values of the response field ty of the Get Traffic Incident Detail API.
Name | Type | Description |
---|---|---|
0 |
string |
Unknown. |
1 |
string |
Minor. |
2 |
string |
Moderate. |
3 |
string |
Major. |
4 |
string |
Undefined, used for road closures and other indefinite delays. |
DrivingSide
Indicates left-hand vs. right-hand side driving at the point of the maneuver.
Name | Type | Description |
---|---|---|
LEFT |
string |
Left side. |
RIGHT |
string |
Right side. |
EffectiveSetting
Effective parameter or data used when calling this Route API.
Name | Type | Description |
---|---|---|
key |
string |
Name of the parameter used. |
value |
string |
Value of the parameter used. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
GuidanceInstructionType
Type of the instruction, e.g., turn or change of road form.
Name | Type | Description |
---|---|---|
DIRECTION_INFO |
string |
Direction information. |
LOCATION_ARRIVAL |
string |
Arrival location. |
LOCATION_DEPARTURE |
string |
Departure location. |
LOCATION_WAYPOINT |
string |
Way point location. |
ROAD_CHANGE |
string |
Road Change. |
TURN |
string |
Turn. |
GuidanceManeuver
A code identifying the maneuver.
Name | Type | Description |
---|---|---|
ARRIVE |
string |
You have arrived. |
ARRIVE_LEFT |
string |
You have arrived. Your destination is on the left. |
ARRIVE_RIGHT |
string |
You have arrived. Your destination is on the right. |
BEAR_LEFT |
string |
Bear left. |
BEAR_RIGHT |
string |
Bear right. |
DEPART |
string |
Leave. |
ENTER_FREEWAY |
string |
Take the freeway. |
ENTER_HIGHWAY |
string |
Take the highway. |
ENTER_MOTORWAY |
string |
Take the motorway. |
ENTRANCE_RAMP |
string |
Take the ramp. |
FOLLOW |
string |
Follow. |
KEEP_LEFT |
string |
Keep left. |
KEEP_RIGHT |
string |
Keep right. |
MAKE_UTURN |
string |
Make a U-turn. |
MOTORWAY_EXIT_LEFT |
string |
Take the left exit. |
MOTORWAY_EXIT_RIGHT |
string |
Take the right exit. |
ROUNDABOUT_BACK |
string |
Go around the roundabout. |
ROUNDABOUT_CROSS |
string |
Cross the roundabout. |
ROUNDABOUT_LEFT |
string |
At the roundabout take the exit on the left. |
ROUNDABOUT_RIGHT |
string |
At the roundabout take the exit on the right. |
SHARP_LEFT |
string |
Turn sharp left. |
SHARP_RIGHT |
string |
Turn sharp right. |
STRAIGHT |
string |
Keep straight on. |
SWITCH_MAIN_ROAD |
string |
Switch to the main road. |
SWITCH_PARALLEL_ROAD |
string |
Switch to the parallel road. |
TAKE_EXIT |
string |
Take the exit. |
TAKE_FERRY |
string |
Take the ferry. |
TRY_MAKE_UTURN |
string |
Try to make a U-turn. |
TURN_LEFT |
string |
Turn left. |
TURN_RIGHT |
string |
Turn right. |
WAYPOINT_LEFT |
string |
You have reached the waypoint. It is on the left. |
WAYPOINT_REACHED |
string |
You have reached the waypoint. |
WAYPOINT_RIGHT |
string |
You have reached the waypoint. It is on the right. |
InclineLevel
Degree of hilliness for thrilling route. This parameter can only be used in conjunction with routeType
=thrilling.
Name | Type | Description |
---|---|---|
high |
string |
high |
low |
string |
low |
normal |
string |
normal |
JunctionType
The type of the junction where the maneuver takes place. For larger roundabouts, two separate instructions are generated for entering and leaving the roundabout.
Name | Type | Description |
---|---|---|
BIFURCATION |
string |
bifurcation |
REGULAR |
string |
regular |
ROUNDABOUT |
string |
roundabout |
LatLongPair
A location represented as a latitude and longitude.
Name | Type | Description |
---|---|---|
latitude |
number |
Latitude property |
longitude |
number |
Longitude property |
Report
Specifies which data should be reported for diagnosis purposes. The only possible value is effectiveSettings. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller.
Name | Type | Description |
---|---|---|
effectiveSettings |
string |
Reports the effective parameters or data used when calling the API. |
ResponseFormat
Desired format of the response. Value can be either json or xml.
Name | Type | Description |
---|---|---|
json |
string |
|
xml |
string |
ResponseSectionType
Section types of the reported route response
Name | Type | Description |
---|---|---|
CARPOOL |
string |
Sections of the route that require use of carpool (HOV/High Occupancy Vehicle) lanes. |
CAR_TRAIN |
string |
Sections of the route that are cars or trains. |
COUNTRY |
string |
Sections indicating which countries/regions the route is in. |
FERRY |
string |
Sections of the route that are ferries. |
MOTORWAY |
string |
Sections of the route that are motorways. |
PEDESTRIAN |
string |
Sections of the route that are only suited for pedestrians. |
TOLL_ROAD |
string |
Sections of the route that require a toll to be payed. |
TOLL_VIGNETTE |
string |
Sections of the route that require a toll vignette to be present. |
TRAFFIC |
string |
Sections of the route that contain traffic information. |
TRAVEL_MODE |
string |
Sections in relation to the request parameter |
TUNNEL |
string |
Sections of the route that are tunnels. |
URBAN |
string |
Sections of the route that are located within urban areas. |
ResponseTravelMode
Travel mode for the calculated route. The value will be set to other
if the requested mode of transport is not possible in this section
Name | Type | Description |
---|---|---|
bicycle |
string |
The returned routes are optimized for bicycles, including use of bicycle lanes. |
bus |
string |
The returned routes are optimized for buses, including the use of bus only lanes. BETA functionality. |
car |
string |
The returned routes are optimized for cars. |
motorcycle |
string |
The returned routes are optimized for motorcycles. BETA functionality. |
other |
string |
The given mode of transport is not possible in this section |
pedestrian |
string |
The returned routes are optimized for pedestrians, including the use of sidewalks. |
taxi |
string |
The returned routes are optimized for taxis. BETA functionality. |
truck |
string |
The returned routes are optimized for commercial vehicles, like for trucks. |
van |
string |
The returned routes are optimized for vans. BETA functionality. |
Route
Name | Type | Description |
---|---|---|
guidance |
Contains guidance related elements. This field is present only when guidance was requested and is available. |
|
legs |
Route |
Legs array |
sections |
Sections array |
|
summary |
Summary object |
RouteAvoidType
Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In Route Range requests, the value alreadyUsedRoads must not be used.
Name | Type | Description |
---|---|---|
alreadyUsedRoads |
string |
Avoids using the same road multiple times. Most useful in conjunction with |
borderCrossings |
string |
Avoids border crossings in route calculation. |
carpools |
string |
Avoids routes that require the use of carpool (HOV/High Occupancy Vehicle) lanes. |
ferries |
string |
Avoids ferries |
motorways |
string |
Avoids motorways |
tollRoads |
string |
Avoids toll roads. |
unpavedRoads |
string |
Avoids unpaved roads |
RouteDirections
This object is returned from a successful Route Directions call
Name | Type | Description |
---|---|---|
formatVersion |
string |
Format Version property |
optimizedWaypoints |
Optimized sequence of waypoints. It shows the index from the user provided waypoint sequence for the original and optimized list. For instance, a response:
means that the original sequence is [0, 1, 2] and optimized sequence is [1, 2, 0]. Since the index starts by 0 the original is "first, second, third" while the optimized is "second, third, first". |
|
report |
Reports the effective settings used in the current call. |
|
routes |
Route[] |
Routes array |
RouteGuidance
Contains guidance related elements. This field is present only when guidance was requested and is available.
Name | Type | Description |
---|---|---|
instructionGroups |
Groups a sequence of instruction elements which are related to each other. |
|
instructions |
A list of instructions describing maneuvers. |
RouteInstruction
A set of attributes describing a maneuver, e.g. 'Turn right', 'Keep left', 'Take the ferry', 'Take the motorway', 'Arrive'.
Name | Type | Description |
---|---|---|
combinedMessage |
string |
A human-readable message for the maneuver combined with the message from the next instruction. Sometimes it is possible to combine two successive instructions into a single instruction making it easier to follow. When this is the case the possibleCombineWithNext flag will be true. For example:
The possibleCombineWithNext flag on instruction 10 is true. This indicates to the clients of coded guidance that it can be combined with instruction 11. The instructions will be combined automatically for clients requesting human-readable guidance. The combinedMessage field contains the combined message:
|
countryCode |
string |
3-character ISO 3166-1 alpha-3 country code. E.g. USA. |
drivingSide |
Indicates left-hand vs. right-hand side driving at the point of the maneuver. |
|
exitNumber |
string |
The number(s) of a highway exit taken by the current maneuver. If an exit has multiple exit numbers, they will be separated by "," and possibly aggregated by "-", e.g., "10, 13-15". |
instructionType |
Type of the instruction, e.g., turn or change of road form. |
|
junctionType |
The type of the junction where the maneuver takes place. For larger roundabouts, two separate instructions are generated for entering and leaving the roundabout. |
|
maneuver |
A code identifying the maneuver. |
|
message |
string |
A human-readable message for the maneuver. |
point |
A location represented as a latitude and longitude. |
|
pointIndex |
integer |
The index of the point in the list of polyline "points" corresponding to the point of the instruction. |
possibleCombineWithNext |
boolean |
It is possible to optionally combine the instruction with the next one. This can be used to build messages like "Turn left and then turn right". |
roadNumbers |
string[] |
The road number(s) of the next significant road segment(s) after the maneuver, or of the road(s) to be followed. Example: ["E34", "N205"] |
roundaboutExitNumber |
integer |
This indicates which exit to take at a roundabout. |
routeOffsetInMeters |
integer |
Distance from the start of the route to the point of the instruction. |
signpostText |
string |
The text on a signpost which is most relevant to the maneuver, or to the direction that should be followed. |
stateCode |
string |
A subdivision (e.g., state) of the country, represented by the second part of an ISO 3166-2 code. This is only available for some countries/regions like the US, Canada, and Mexico. |
street |
string |
Street name of the next significant road segment after the maneuver, or of the street that should be followed. |
travelTimeInSeconds |
integer |
Estimated travel time up to the point corresponding to routeOffsetInMeters. |
turnAngleInDecimalDegrees |
integer |
Indicates the direction of an instruction. If junctionType indicates a turn instruction:
If junctionType indicates a bifurcation instruction:
|
RouteInstructionGroup
Groups a sequence of instruction elements which are related to each other. The sequence range is constrained with firstInstructionIndex and lastInstructionIndex. When human-readable text messages are requested for guidance (instructionType=text or tagged), then the instructionGroup has a summary message returned when available.
Name | Type | Description |
---|---|---|
firstInstructionIndex |
integer |
Index of the first instruction in the instructions and belonging to this group. |
groupLengthInMeters |
integer |
Length of the group. |
groupMessage |
string |
Summary message when human-readable text messages are requested for guidance (instructionType=text or tagged). |
lastInstructionIndex |
integer |
Index of the last instruction in the instructions and belonging to this group. |
RouteInstructionsType
If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none.
Name | Type | Description |
---|---|---|
coded |
string |
Returns raw instruction data without human-readable messages. |
tagged |
string |
Returns raw instruction data with tagged human-readable messages to permit formatting. A human-readable message is built up from repeatable identified elements. These are tagged to allow client applications to format them correctly. The following message components are tagged when instructionsType=tagged: street, roadNumber, signpostText, exitNumber, roundaboutExitNumber. Example of tagged 'Turn left' message:
|
text |
string |
Returns raw instructions data with human-readable messages in plain text. |
RouteLeg
A description of a part of a route, comprised of a list of points. Each additional waypoint provided in the request will result in an additional leg in the returned route.
Name | Type | Description |
---|---|---|
points |
Points array |
|
summary |
Summary object for route section. |
RouteLegSummary
Summary object for route section.
Name | Type | Description |
---|---|---|
arrivalTime |
string |
The estimated arrival time for the route or leg. Time is in UTC. |
batteryConsumptionInkWh |
number |
Estimated electric energy consumption in kilowatt hours (kWh) using the Electric Consumption Model. Included if vehicleEngineType is set to electric and constantSpeedConsumptionInkWhPerHundredkm is specified. The value of batteryConsumptionInkWh includes the recuperated electric energy and can therefore be negative (which indicates gaining energy). If both maxChargeInkWh and currentChargeInkWh are specified, recuperation will be capped to ensure that the battery charge level never exceeds maxChargeInkWh. If neither maxChargeInkWh nor currentChargeInkWh are specified, unconstrained recuperation is assumed in the consumption calculation. |
departureTime |
string |
The estimated departure time for the route or leg. Time is in UTC. |
fuelConsumptionInLiters |
number |
Estimated fuel consumption in liters using the Combustion Consumption Model. Included if vehicleEngineType is set to combustion and constantSpeedConsumptionInLitersPerHundredkm is specified. The value will be non-negative. |
historicTrafficTravelTimeInSeconds |
integer |
Estimated travel time calculated using time-dependent historic traffic data. Included only if computeTravelTimeFor = all is used in the query. |
lengthInMeters |
integer |
Length In Meters property |
liveTrafficIncidentsTravelTimeInSeconds |
integer |
Estimated travel time calculated using real-time speed data. Included only if computeTravelTimeFor = all is used in the query. |
noTrafficTravelTimeInSeconds |
integer |
Estimated travel time calculated as if there are no delays on the route due to traffic conditions (e.g. congestion). Included only if computeTravelTimeFor = all is used in the query. |
trafficDelayInSeconds |
integer |
Estimated delay in seconds caused by the real-time incident(s) according to traffic information. For routes planned with departure time in the future, delays is always 0. To return additional travel times using different types of traffic information, parameter computeTravelTimeFor=all needs to be added. |
travelTimeInSeconds |
integer |
Estimated travel time in seconds property that includes the delay due to real-time traffic. Note that even when traffic=false travelTimeInSeconds still includes the delay due to traffic. If DepartAt is in the future, travel time is calculated using time-dependent historic traffic data. |
RouteOptimizedWaypoint
Optimized way point object.
Name | Type | Description |
---|---|---|
optimizedIndex |
integer |
Optimized way point index from the system. |
providedIndex |
integer |
Way point index provided by the user. |
RouteReport
Reports the effective settings used in the current call.
Name | Type | Description |
---|---|---|
effectiveSettings |
Effective parameters or data used when calling this Route API. |
RouteRepresentationForBestOrder
Specifies the representation of the set of routes provided as response.
Name | Type | Description |
---|---|---|
none |
string |
Includes only the optimized waypoint indices but does not include the route geometry in the response. This parameter value can only be used in conjunction with computeBestOrder=true. |
polyline |
string |
Includes route geometry in the response. |
summaryOnly |
string |
Summary as per polyline but excluding the point geometry elements for the routes in the response. |
RouteSection
Route sections contain additional information about parts of a route. Each section contains at least the elements startPointIndex
, endPointIndex
, and sectionType
.
Name | Type | Description |
---|---|---|
delayInSeconds |
integer |
Delay in seconds caused by the incident. |
effectiveSpeedInKmh |
integer |
Effective speed of the incident in km/h, averaged over its entire length. |
endPointIndex |
integer |
Index of the last point (offset 0) in the route this section applies to. |
magnitudeOfDelay |
The magnitude of delay caused by the incident. These values correspond to the values of the response field ty of the Get Traffic Incident Detail API. |
|
sectionType |
Section types of the reported route response |
|
simpleCategory |
Type of the incident. Can currently be JAM, ROAD_WORK, ROAD_CLOSURE, or OTHER. See "tec" for detailed information. |
|
startPointIndex |
integer |
Index of the first point (offset 0) in the route this section applies to. |
tec |
Details of the traffic event, using definitions in the TPEG2-TEC standard. Can contain effectCode and causes elements. |
|
travelMode |
Travel mode for the calculated route. The value will be set to |
RouteSectionTec
Details of the traffic event, using definitions in the TPEG2-TEC standard. Can contain effectCode and causes elements.
Name | Type | Description |
---|---|---|
causes |
Causes array |
|
effectCode |
integer |
The effect on the traffic flow. Contains a value in the tec001:EffectCode table, as defined in the TPEG2-TEC standard. Can be used to color-code traffic events according to severity. |
RouteSectionTecCause
The cause of the traffic event. Can contain mainCauseCode and subCauseCode elements. Can be used to define iconography and descriptions.
Name | Type | Description |
---|---|---|
mainCauseCode |
integer |
The main cause of the traffic event. Contains a value in the tec002:CauseCode table, as defined in the TPEG2-TEC standard. |
subCauseCode |
integer |
The subcause of the traffic event. Contains a value in the sub cause table defined by the mainCauseCode, as defined in the TPEG2-TEC standard. |
RouteSummary
Summary object
Name | Type | Description |
---|---|---|
arrivalTime |
string |
The estimated arrival time for the route or leg. Time is in UTC. |
departureTime |
string |
The estimated departure time for the route or leg. Time is in UTC. |
lengthInMeters |
integer |
Length In Meters property |
trafficDelayInSeconds |
integer |
Estimated delay in seconds caused by the real-time incident(s) according to traffic information. For routes planned with departure time in the future, delays is always 0. To return additional travel times using different types of traffic information, parameter computeTravelTimeFor=all needs to be added. |
travelTimeInSeconds |
integer |
Estimated travel time in seconds property that includes the delay due to real-time traffic. Note that even when traffic=false travelTimeInSeconds still includes the delay due to traffic. If DepartAt is in the future, travel time is calculated using time-dependent historic traffic data. |
RouteType
The type of route requested.
Name | Type | Description |
---|---|---|
eco |
string |
A route balanced by economy and speed. |
fastest |
string |
The fastest route. |
shortest |
string |
The shortest route by distance. |
thrilling |
string |
Includes interesting or challenging roads and uses as few motorways as possible. You can choose the level of turns included and also the degree of hilliness. See the hilliness and windingness parameters for how to set this. There is a limit of 900 km on routes planned with |
SectionType
Specifies which of the section types is reported in the route response.
For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Can be specified multiple times in one request, for example, '§ionType=carTrain§ionType=pedestrian§ionType=motorway'. The default sectionType refers to the travelMode input. By default travelMode is set to car
Name | Type | Description |
---|---|---|
carTrain |
string |
Sections of the route that are cars or trains. |
carpool |
string |
Sections of the route that require use of carpool (HOV/High Occupancy Vehicle) lanes. |
country |
string |
Sections indicating which countries/regions the route is in. |
ferry |
string |
Sections of the route that are ferries. |
motorway |
string |
Sections of the route that are motorways. |
pedestrian |
string |
Sections of the route that are only suited for pedestrians. |
tollRoad |
string |
Sections of the route that require a toll to be paid. |
tollVignette |
string |
Sections of the route that require a toll vignette to be present. |
traffic |
string |
Sections of the route that contain traffic information. |
travelMode |
string |
Sections in relation to the request parameter |
tunnel |
string |
Sections of the route that are tunnels. |
urban |
string |
Sections of the route that are located within urban areas. |
SimpleCategory
Type of the incident. Can currently be JAM, ROAD_WORK, ROAD_CLOSURE, or OTHER. See "tec" for detailed information.
Name | Type | Description |
---|---|---|
JAM |
string |
Traffic jam. |
OTHER |
string |
Other. |
ROAD_CLOSURE |
string |
Road closure. |
ROAD_WORK |
string |
Road work. |
TravelMode
The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas.
Name | Type | Description |
---|---|---|
bicycle |
string |
The returned routes are optimized for bicycles, including use of bicycle lanes. |
bus |
string |
The returned routes are optimized for buses, including the use of bus only lanes. BETA functionality. |
car |
string |
The returned routes are optimized for cars. |
motorcycle |
string |
The returned routes are optimized for motorcycles. BETA functionality. |
pedestrian |
string |
The returned routes are optimized for pedestrians, including the use of sidewalks. |
taxi |
string |
The returned routes are optimized for taxis. BETA functionality. |
truck |
string |
The returned routes are optimized for commercial vehicles, like for trucks. |
van |
string |
The returned routes are optimized for vans. BETA functionality. |
VehicleEngineType
Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of vehicleEngineType.
Name | Type | Description |
---|---|---|
combustion |
string |
Internal combustion engine. |
electric |
string |
Electric engine. |
VehicleLoadType
Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries/regions. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries/regions. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck.
Name | Type | Description |
---|---|---|
USHazmatClass1 |
string |
Explosives |
USHazmatClass2 |
string |
Compressed gas |
USHazmatClass3 |
string |
Flammable liquids |
USHazmatClass4 |
string |
Flammable solids |
USHazmatClass5 |
string |
Oxidizers |
USHazmatClass6 |
string |
Poisons |
USHazmatClass7 |
string |
Radioactive |
USHazmatClass8 |
string |
Corrosives |
USHazmatClass9 |
string |
Miscellaneous |
otherHazmatExplosive |
string |
Explosives |
otherHazmatGeneral |
string |
Miscellaneous |
otherHazmatHarmfulToWater |
string |
Harmful to water |
WindingnessLevel
Level of turns for thrilling route. This parameter can only be used in conjunction with routeType
=thrilling.
Name | Type | Description |
---|---|---|
high |
string |
high |
low |
string |
low |
normal |
string |
normal |