Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LatLngBounds

Hierarchy

  • LatLngBounds

Index

Constructors

constructor

  • Creates a LatLngBounds object by defining south-west and north-east corners of the rectangle.

    Parameters

    Returns LatLngBounds

  • Creates a LatLngBounds object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with fitBounds.

    Parameters

    Returns LatLngBounds

Methods

contains

  • Returns true if the rectangle contains the given one.

    Parameters

    Returns boolean

  • Returns true if the rectangle contains the given point.

    Parameters

    Returns boolean

equals

  • Returns true if the rectangle is equivalent (within a small margin of error) to the given bounds.

    Parameters

    Returns boolean

extend

  • Extends the bounds to contain the given point.

    Parameters

    Returns LatLngBounds

  • Extends the bounds to contain the given bounds.

    Parameters

    Returns LatLngBounds

getCenter

  • Returns the center point of the bounds.

    Returns LatLng

getNorthEast

  • Returns the north-east point of the bounds.

    Returns LatLng

getNorthWest

  • Returns the north-west point of the bounds.

    Returns LatLng

getSouthEast

  • Returns the south-east point of the bounds.

    Returns LatLng

getSouthWest

  • Returns the south-west point of the bounds.

    Returns LatLng

intersects

  • Returns true if the rectangle intersects the given bounds.

    Parameters

    Returns boolean

isValid

  • isValid(): boolean
  • Returns true if the bounds are properly initialized.

    Returns boolean

pad

  • Returns bigger bounds created by extending the current bounds by a given percentage in each direction.

    Parameters

    • bufferRatio: number

    Returns LatLngBounds

toBBoxString

  • 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.

    Returns string