Skip to content

Latest commit

 

History

History
165 lines (84 loc) · 4.49 KB

LatLngBounds.md

File metadata and controls

165 lines (84 loc) · 4.49 KB

See html formatted version

LatLngBounds class

google.maps.LatLngBounds class

A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180 degrees longitudinal meridian.

Constructor

undefined

LatLngBounds([sw, ne])

Parameters: 

Constructs a rectangle from the points at its south-west and north-east corners.

Methods

undefined

contains(latLng)

Parameters: 

Return Value:  boolean

Returns true if the given lat/lng is in this bounds.

undefined

equals(other)

Parameters: 

Return Value:  boolean

Returns true if this bounds approximately equals the given bounds.

undefined

extend(point)

Parameters: 

Return Value:  LatLngBounds

Extends this bounds to contain the given point.

undefined

getCenter()

Parameters:  None

Return Value:  LatLng

Computes the center of this LatLngBounds

undefined

getNorthEast()

Parameters:  None

Return Value:  LatLng

Returns the north-east corner of this bounds.

undefined

getSouthWest()

Parameters:  None

Return Value:  LatLng

Returns the south-west corner of this bounds.

undefined

intersects(other)

Parameters: 

Return Value:  boolean

Returns true if this bounds shares any points with the other bounds.

undefined

isEmpty()

Parameters:  None

Return Value:  boolean

Returns if the bounds are empty.

undefined

toJSON()

Parameters:  None

Return Value:  LatLngBoundsLiteral

Converts to JSON representation. This function is intended to be used via JSON.stringify.

undefined

toSpan()

Parameters:  None

Return Value:  LatLng

Converts the given map bounds to a lat/lng span.

undefined

toString()

Parameters:  None

Return Value:  string

Converts to string.

undefined

toUrlValue([precision])

Parameters: 

  • precision:  number optional

Return Value:  string

Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the southwest corner of the bounding box, while "hi" corresponds to the northeast corner of that box.

undefined

union(other)

Parameters: 

Return Value:  LatLngBounds

Extends this bounds to contain the union of this and the given bounds.