Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine the corners coordinate in Google maps V3

How could I determine the visible map corner coordinate:enter image description here

like image 281
OHLÁLÁ Avatar asked Dec 21 '22 15:12

OHLÁLÁ


1 Answers

Use the getBounds() method of your map, which returns a LatLngBounds object.

Returns the lat/lng bounds of the current viewport. If the map is not yet initialized (i.e. the mapType is still null), or center and zoom have not been set then the result is null or undefined.

Maps V3 Javascript API docs

like image 149
Pekka Avatar answered Dec 26 '22 10:12

Pekka