LatLngBounds

data class LatLngBounds(val northEast: LatLng, val southWest: LatLng) : Parcelable

A rectangle in geographical coordinates from points at the southwest and northeast corners.

Constructors

Link copied to clipboard
constructor(@FloatRange(from = -90.0, to = 90.0) latNorth: Double, lonEast: Double, @FloatRange(from = -90.0, to = 90.0) latSouth: Double, lonWest: Double)

Constructs a LatLngBounds from doubles representing a LatLng pair.

constructor(northEast: LatLng, southWest: LatLng)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Get the north latitude value of this bounds.

Link copied to clipboard

Get the south latitude value of this bounds.

Link copied to clipboard

Get the east longitude value of this bounds.

Link copied to clipboard

Get the west longitude value of this bounds.

Link copied to clipboard
@SerializedName(value = "northeast")
val northEast: LatLng

The North-Eastern point of those bounds.

Link copied to clipboard
@SerializedName(value = "southwest")
val southWest: LatLng

The South-Western point of those bounds.

Functions

Link copied to clipboard
operator fun contains(latLng: LatLng): Boolean

Determines whether this LatLngBounds contains a point.

operator fun contains(other: LatLngBounds): Boolean

Determines whether this LatLngBounds contains another bounds.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Calculates the centerpoint of this LatLngBounds by simple interpolation and returns it as a point. This is a non-geodesic calculation which is not the geographic center.

Link copied to clipboard

Get the absolute distance, in degrees, between the north and south boundaries of this LatLngBounds

Link copied to clipboard

Get the absolute distance, in degrees, between the west and east boundaries of this LatLngBounds

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Constructs a LatLngBounds from current bounds with an additional latitude-longitude pair.

Link copied to clipboard

Returns a new LatLngBounds that is the intersection of this with another LatLngBounds,

fun intersect(northLat: Double, eastLon: Double, southLat: Double, westLon: Double): LatLngBounds

Returns a new LatLngBounds that is the intersection of this with another box.

Link copied to clipboard

Validate if LatLngBounds is empty, determined if absolute distance is

Link copied to clipboard

Extension method to convert a LatLngBounds to a Polygon Geometry.

Link copied to clipboard
open override fun toString(): String

Returns a string representaton of the object.

Link copied to clipboard
fun union(northLat: Double, eastLon: Double, southLat: Double, westLon: Double): LatLngBounds

Returns a new LatLngBounds that stretches to contain both this and another LatLngBounds.