# Google Maps Route Optimization V1 Client - Class Location (0.6.2)

0.6.2 (latest) 0.6.1 0.5.1 0.4.1 0.3.3 0.2.0 0.1.0 Reference documentation and code samples for the Google Maps Route Optimization V1 Client class Location.

Encapsulates a location (a geographic point, and an optional heading).

Generated from protobuf message `google.maps.routeoptimization.v1.Location`

## Namespace

Google \\ Maps \\ RouteOptimization \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ lat_lng` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LatLng.html` The waypoint's geographic coordinates. |
| `↳ heading` | `int` The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc. |

### getLatLng

The waypoint's geographic coordinates.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LatLng.html|null` |   |

### hasLatLng

### clearLatLng

### setLatLng

The waypoint's geographic coordinates.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LatLng.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHeading

The compass heading associated with the direction of the flow of traffic.

This value is used to specify the side of the road to use for pickup and
drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
of due North, 90 specifies a heading of due East, etc.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasHeading

### clearHeading

### setHeading

The compass heading associated with the direction of the flow of traffic.

This value is used to specify the side of the road to use for pickup and
drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
of due North, 90 specifies a heading of due East, etc.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |