LatLngBounds

class LatLngBounds : Parcelable


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 constructors

LatLngBounds(
    northEastLat: Double,
    northEastLng: Double,
    southWestLat: Double,
    southWestLng: Double
)

Constructor for LatLngBounds with parameters for required fields.

Public functions

Unit
writeToParcel(dest: Parcel!, flags: Int)

Extension functions

Unit

Validates a specified LatLngBounds object properties.

Inherited functions

From android.os.Parcelable
abstract Int

Constants

CREATOR

const val CREATORParcelable.Creator<LatLngBounds!>!

Public constructors

LatLngBounds

LatLngBounds(
    northEastLat: Double,
    northEastLng: Double,
    southWestLat: Double,
    southWestLng: Double
)

Constructor for LatLngBounds with parameters for required fields.

Parameters
northEastLat: Double

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

northEastLng: Double

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

southWestLat: Double

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

southWestLng: Double

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

Public functions

writeToParcel

fun writeToParcel(dest: Parcel!, flags: Int): Unit

Public properties

northEastLat

var northEastLatDouble

northEastLng

var northEastLngDouble

southWestLat

var southWestLatDouble

southWestLng

var southWestLngDouble

Extension functions

validate

fun LatLngBounds.validate(): Unit

Validates a specified LatLngBounds object properties.

Throws
java.lang.IllegalArgumentException

If any of the properties in the LatLngBounds is not valid.