Map API getBounds() Method | Rookie Tutorial
Rookie Tutorial --
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
Google Maps API Tutorial
Google API TutorialGoogle Maps APIGoogle Maps BasicsGoogle Maps OverlaysGoogle Maps EventsGoogle Maps ControlsGoogle Maps TypesGoogle Maps ReferenceMap API Map() Constructor
In-depth Exploration
Map
Scripting Languages
Programming
Programming Languages
Web Service
Search
Script
Software
Computer Science
Development Tools
Map API getBounds() Method
Example
Return the southwest latitude/longitude and northeast latitude/longitude of the current viewport:
map.getBounds();
Definition and Usage
The getBounds() method returns the southwest latitude/longitude and northeast latitude/longitude of the current viewport.
Syntax
_mapvariable_.getBounds();
Return Value
map.getBounds();
_mapvariable_.getBounds();
| Value | Description |
|---|---|
| (south-west latitude, longitude),(north-east latitude, longitude) | Defines a rectangle from the southwest and northeast corners of the point. |
YouTip