Sets the center of the map.
mapInstance.setCenter(LatLng);
Required Parameter
Description
Type
LatLng
Latitude and longitude to be set as the center of the map
JSON
let LatLng = { lat: 37.574674, lng: 126.958004 } mapInstance.setCenter(LatLng);
Retrieves the latitude and longitude value set in "setCenter()"
mapInstance.getCenter();
The map's geographical center point
Last updated 5 years ago
Was this helpful?
mapInstance.getCenter(); return : { lat: 37.574674, lng: 126.958004 }