Stay organized with collections
Save and categorize content based on your preferences.
Locations may include modifiers to change how routes are calculated.
Using the Heading Parameter
When you specify waypoints (origin, destination, and intermediates) for a route,
you can specify the direction you want the vehicle to head when it arrives
at each waypoint. You can use this feature to ensures that the vehicle arrives
on the same side of the road as the consumer waiting to be picked up. When you
don't specify a heading, the vehicle can arrive on the wrong side of the road.
Specifying a heading for a waypoint
Heading values are whole numbers that align with the compass directions, and
therefore range from zero to 359. For example, a value of 0 indicates a heading
direction of due North.
Example
The following example demonstrates how to set a
heading
for a waypoint.
When specifying a waypoint, you can request that the route go through whichever
side of the road the waypoint is biased towards by using the side_of_road
parameter.
Example
The following example demonstrates how to set
side_of_road
for a waypoint.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-15 UTC."],[[["\u003cp\u003eWaypoint locations for routes can be modified using \u003ccode\u003eheading\u003c/code\u003e or \u003ccode\u003eside_of_road\u003c/code\u003e parameters to refine route calculations.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eheading\u003c/code\u003e guides vehicle direction at waypoints (0-359 degrees, like compass directions) and is compatible with \u003ccode\u003eDrive\u003c/code\u003e and \u003ccode\u003eTwo-wheeler\u003c/code\u003e travel modes.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eside_of_road\u003c/code\u003e biases the route towards the waypoint's side of the road and is only compatible with the \u003ccode\u003eDrive\u003c/code\u003e travel mode.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eheading\u003c/code\u003e and \u003ccode\u003eside_of_road\u003c/code\u003e parameters cannot be used together for the same location.\u003c/p\u003e\n"]]],["Waypoints in routes can be modified using `heading` or `side_of_road`, but not together. `Heading` defines the vehicle's arrival direction at a waypoint (0-359, like a compass), applicable to `Drive` or `Two-wheeler` modes. `Side_of_road` biases the route towards a specific side of the road at a waypoint and it's only applicable to `Drive` mode. Examples show how to include `heading` and `side_of_road` within waypoint specifications using whole numbers.\n"],null,[]]