Center

setCenter

mapInstance.setCenter(LatLng);

Parameters

Parameter (Required)
Description
Remark

LatLng

Latitude and longitude to be set as the center of the map

JSON

Returns

Parameter
Description
Remark

Example

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

getCenter

mapInstance.getCenter();

Parameters

Parameter (Required)
Description
Remark

Returns

Parameter
Description
Remark

The map's geographical center point

Example

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

The MOGOS Maps API requires an API Key, which can be obtained from the MOGOS Console website or contact [email protected].

Last updated