Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Access by calling const {LatLngBounds} = await google.maps.importLibrary("core"). See https://developers.google.com/maps/documentation/javascript/libraries.

Hierarchy

  • LatLngBounds

Index

Constructors

Properties

MAX_BOUNDS: LatLngBounds

LatLngBounds for the max bounds of the Earth. These bounds will encompass the entire globe.

Methods

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

    Parameters

    Returns boolean

  • Computes the center of this LatLngBounds

    Returns LatLng

  • Returns the north-east corner of this bounds.

    Returns LatLng

  • Returns the south-west corner of this bounds.

    Returns LatLng

  • isEmpty(): boolean
  • Returns if the bounds are empty.

    Returns boolean

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

    Returns LatLngBoundsLiteral

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

    Returns LatLng

  • toString(): string
  • Converts to string.

    Returns string

  • toUrlValue(precision?: number): 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.

    Parameters

    • Optional precision: number

    Returns string

Generated using TypeDoc