Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Maps API getCenter() Method

Maps API getCenter() Method

Map() Constructor Map() Constructor

Example

Returns the latitude/longitude of the current center of the map:

map.getCenter();

Try it »


Definition and Usage

The getCenter() method returns the latitude/longitude of the current center of the map.


Syntax

mapvariable

.getCenter();


Return Value

Value Description
latitude, longitude The latitude/longitude of the current center of the map.

Map() Constructor Map() Constructor