Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Maps API getBounds() Method

Maps API getBounds() Method

Map() Constructor Map() Constructor

Example

Returns the southwest latitude/longitude and northeast latitude/longitude of the current viewport:

map.getBounds();

Try it »


Definition and Usage

The getBounds() method returns the southwest latitude/longitude and northeast latitude/longitude of the current viewport.


Syntax

mapvariable

.getBounds();


Return Value

Value Description
(south-west latitude, longitude),(north-east latitude, longitude) Define a rectangle from the southwest corner and northeast corner of a point.

Map() Constructor Map() Constructor