# Google API Common Protos Client - Class LatLng (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class LatLng.

An object that represents a latitude/longitude pair. This is expressed as a
pair of doubles to represent degrees latitude and degrees longitude. Unless
specified otherwise, this object must conform to the
[WGS84 standard](https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version). Values must be within normalized ranges.

Generated from protobuf message `google.type.LatLng`

## Namespace

Google \\ Type

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ latitude` | `float` The latitude in degrees. It must be in the range \[-90.0, +90.0\]. |
| `↳ longitude` | `float` The longitude in degrees. It must be in the range \[-180.0, +180.0\]. |

### getLatitude

The latitude in degrees. It must be in the range \[-90.0, +90.0\].

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setLatitude

The latitude in degrees. It must be in the range \[-90.0, +90.0\].

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

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

### getLongitude

The longitude in degrees. It must be in the range \[-180.0, +180.0\].

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setLongitude

The longitude in degrees. It must be in the range \[-180.0, +180.0\].

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

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