Center

setCenter

Sets the center of the map.

mapInstance.setCenter(LatLng);

Parameter

Example

let LatLng = {
        lat: 37.574674, 
        lng: 126.958004
}
mapInstance.setCenter(LatLng);

getCenter

Retrieves the latitude and longitude value set in "setCenter()"

mapInstance.getCenter();

Return

The map's geographical center point

Example

mapInstance.getCenter();
return : {
        lat: 37.574674, 
        lng: 126.958004
}

Last updated