FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

Maps API getBounds() Method

Map() Constructor Map() Constructor

Example

Returns the south-west latitude/longitude and the north-east latitude/longitude of the current viewport:

map.getBounds();
Try it Yourself »

Definition and Usage

The getBounds() method returns the south-west latitude/longitude and the north-east latitude/longitude of the current viewport.


Syntax

mapvariable.getBounds();

Return Values

Value Description
(south-west latitude, longitude),(north-east latitude, longitude) Specifies a rectangle from the points at its south-west and north-east corners

Map() Constructor Map() Constructor