Search w3schools.com:

SHARE THIS PAGE

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


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]