**European Economic Area (EEA) developers**

> [!NOTE]
> If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](https://developers.google.com/maps/comms/eea/faq.md.txt).

Waypoints may include location modifiers to change how routes are calculated,
including settings for `heading` and `sideOfRoad`.

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

> [!CAUTION]
> **Caution:** Requests using `heading` and `sideOfRoad` are billed at a higher rate. [Learn more about billing](https://developers.google.com/maps/documentation/routes/usage-and-billing.md.txt) for Routes API.

## Specify the vehicle heading

To define a waypoint, you specify the geographic
[Location](https://developers.google.com/maps/documentation/routes/reference/rest/v2/Location.md.txt) (REST) or
[Location](https://developers.google.com/maps/documentation/routes/reference/rpc/google.maps.routing.v2.md.txt#location) (gRPC)
as a pair of latitude/longitude coordinates.

Location also lets you 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 `heading` only when using either the `Drive` or `Two-wheeler` travel modes, and when specifying the location by using a latitude and longitude pair.

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.

The following example demonstrates how to set a
[`heading`](https://developers.google.com/maps/documentation/routes/reference/rest/v2/Location.md.txt) for a waypoint.

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

## Specify a side of the road preference

You represent a location by creating a [Waypoint](https://developers.google.com/maps/documentation/routes/reference/rest/v2/Waypoint.md.txt)
(REST) or [Waypoint](https://developers.google.com/maps/documentation/routes/reference/rpc/google.maps.routing.v2.md.txt#waypoint) (gRPC)
object. A location defined by a latitude and longitude pair can correspond to a
specific side of a road. However, to support route optimization, a route can
still set a stopover to be on the opposite side of the road from the specified
location.

Waypoints support the [`sideOfRoad`](https://developers.google.com/maps/documentation/routes/reference/rest/v2/Waypoint.md.txt) property, which
indicates that the waypoint location has a preference for the vehicle to stop at
the same side of road as specified by the location.

Specify that the route uses the preferred side of the road by setting the
Waypoint `sideOfRoad` property to `true`. The route then passes through the
location so that the vehicle can stop at the side of road that the location is
biased towards.

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

The following example shows how to set `sideOfRoad` for a waypoint.

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