Last updated 4 years ago
Sets the center of the map.
mapInstance.setCenter(LatLng);
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
mapInstance.getCenter(); return : { lat: 37.574674, lng: 126.958004 }
Required Parameter
Description
Type
LatLng
Latitude and longitude to be set as the center of the map
JSON