> [!NOTE]
> **Note:** `heading` and `side_of_road` are incompatible. You may not use them for the same location.

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.

> [!NOTE]
> **Note:** You can set the heading only when using either the `Drive` or `Two-wheeler` travel modes.

### 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`](https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/Location.md.txt#FIELDS.heading)
for a waypoint.

```
{
  "latLng": {
    "latitude":37.419734,
    "longitude":-122.0827784
  },
  "heading": 127
}
```

## Using the Side of Road Parameter

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.

> [!NOTE]
> **Note:** You can set `side_of_road` only when using the `Drive` travel mode.

### Example

The following example demonstrates how to set
[`side_of_road`](https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/Waypoint.md.txt#FIELDS.side_of_road)
for a waypoint.

```
"location": {
  "latLng": {
    "latitude":37.419734,
    "longitude":-122.0827784
  },
}
"sideOfRoad": true
```