YouTip LogoYouTip

Ref Getbounds

Map API getBounds() Method | Rookie Tutorial

Map API getBounds() Method | Rookie Tutorial

Rookie Tutorial --

Google Maps API Tutorial

Google API TutorialGoogle Maps APIGoogle Maps BasicsGoogle Maps OverlaysGoogle Maps EventsGoogle Maps ControlsGoogle Maps TypesGoogle Maps ReferenceMap API Map() Constructor

Google Maps Reference

Map API getCenter() Method

In-depth Exploration

Map

Scripting Languages

Programming

Programming Languages

Web Service

Search

Script

Software

Computer Science

Development Tools

Map API getBounds() Method

Map() Constructor Map() Constructor

Example

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

 map.getBounds();

Try it Yourself Β»


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) Defines a rectangle from the southwest and northeast corners of the point.

Map() Constructor Map() Constructor

← Ref GetcenterRef Mapoptions β†’