Method |
Returns |
Description |
extend( <LatLng|LatLngBounds> latlng ) |
this |
Extends the bounds to contain the given point or bounds. |
getSouthWest() |
LatLng |
Returns the south-west point of the bounds. |
getNorthEast() |
LatLng |
Returns the north-east point of the bounds. |
getNorthWest() |
LatLng |
Returns the north-west point of the bounds. |
getSouthEast() |
LatLng |
Returns the south-east point of the bounds. |
getWest() |
Number |
Returns the west longitude of the bounds. |
getSouth() |
Number |
Returns the south latitude of the bounds. |
getEast() |
Number |
Returns the east longitude of the bounds. |
getNorth() |
Number |
Returns the north latitude of the bounds. |
getCenter() |
LatLng |
Returns the center point of the bounds. |
contains( <LatLngBounds> otherBounds ) |
Boolean |
Returns true if the rectangle contains the given one. |
contains( <LatLng> latlng ) |
Boolean |
Returns true if the rectangle contains the given point. |
intersects( <LatLngBounds> otherBounds ) |
Boolean |
Returns true if the rectangle intersects the given bounds. |
equals( <LatLngBounds> otherBounds ) |
Boolean |
Returns true if the rectangle is equivalent (within a small margin of error) to the given bounds. |
toBBoxString() |
String |
Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data. |
pad( <Number> bufferRatio ) |
LatLngBounds |
Returns bigger bounds created by extending the current bounds by a given percentage in each direction. |
isValid() |
Boolean |
Returns true if the bounds are properly initialized. |