# LatLngBounds


```
public class LatLngBounds implements Parcelable
```

<br />

*** ** * ** ***

Represents a rectangle in geographical coordinates, including one that crosses the 180 degrees longitudinal meridian. This bounds are used to clamp the lat,lng the eye-point (aka look form camera) to be within the bounds. It does not mean, however, that things outside of this bounds won't be visible on the map. Bounds can restrict both longitude and latitude, or can restrict either latitude or longitude only. For latitude-only bounds use west and east longitudes of -180 and 180, respectively. For longitude-only bounds use north and south latitudes of 90 and -90, respectively.

## Summary

| ### Public fields |
|---|---|
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#northEastLat()` |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#northEastLng()` |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#southWestLat()` |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#southWestLng()` |

| ### Public constructors |
|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#LatLngBounds(double,double,double,double)( double northEastLat, double northEastLng, double southWestLat, double southWestLng )` Constructor for LatLngBounds with parameters for required fields. |

| ### Public methods |
|---|---|
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#getNorthEastLat()()` The latitude of the north-east corner of the bounds. |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#getNorthEastLng()()` The longitude of the north-east corner of the bounds. |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#getSouthWestLat()()` The latitude of the south-west corner of the bounds. |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#getSouthWestLng()()` The longitude of the south-west corner of the bounds. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#setNorthEastLat(double)(double northEastLat)` Sets the latitude of the north-east corner of the bounds. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#setNorthEastLng(double)(double northEastLng)` Sets the longitude of the north-east corner of the bounds. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#setSouthWestLat(double)(double southWestLat)` Sets the latitude of the south-west corner of the bounds. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#setSouthWestLng(double)(double southWestLng)` Sets the longitude of the south-west corner of the bounds. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#writeToParcel(android.os.Parcel,int)(https://developer.android.com/reference/android/os/Parcel.html dest, int flags)` |

| ### Extension functions |
|---|---|
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ValidatorsKt.https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds#(com.google.android.gms.maps3d.model.LatLngBounds).validate()(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds receiver)` Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds` object properties. |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited methods

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract int` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()`

## Public fields

### northEastLat

```
public double northEastLat
```

### northEastLng

```
public double northEastLng
```

### southWestLat

```
public double southWestLat
```

### southWestLng

```
public double southWestLng
```

## Public constructors

### LatLngBounds

```
public LatLngBounds(
    double northEastLat,
    double northEastLng,
    double southWestLat,
    double southWestLng
)
```

Constructor for LatLngBounds with parameters for required fields.

| Parameters |
|---|---|
| `double northEastLat` | The latitude of the north-east corner of the bounds. |
| `double northEastLng` | The longitude of the north-east corner of the bounds. |
| `double southWestLat` | The latitude of the south-west corner of the bounds. |
| `double southWestLng` | The longitude of the south-west corner of the bounds. |

## Public methods

### getNorthEastLat

```
public double getNorthEastLat()
```

The latitude of the north-east corner of the bounds.

### getNorthEastLng

```
public double getNorthEastLng()
```

The longitude of the north-east corner of the bounds.

### getSouthWestLat

```
public double getSouthWestLat()
```

The latitude of the south-west corner of the bounds.

### getSouthWestLng

```
public double getSouthWestLng()
```

The longitude of the south-west corner of the bounds.

### setNorthEastLat

```
public void setNorthEastLat(double northEastLat)
```

Sets the latitude of the north-east corner of the bounds.

### setNorthEastLng

```
public void setNorthEastLng(double northEastLng)
```

Sets the longitude of the north-east corner of the bounds.

### setSouthWestLat

```
public void setSouthWestLat(double southWestLat)
```

Sets the latitude of the south-west corner of the bounds.

### setSouthWestLng

```
public void setSouthWestLng(double southWestLng)
```

Sets the longitude of the south-west corner of the bounds.

### writeToParcel

```
public void writeToParcel(Parcel dest, int flags)
```

## Extension functions

### ValidatorsKt.validate

```
public final void ValidatorsKt.validate(@NonNull LatLngBounds receiver)
```

Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds` object properties.

| Throws |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/index.html` | If any of the properties in the `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds` is not valid. |