# Center

### setCenter

Sets the center of the map.

```
mapInstance.setCenter(LatLng);
```

#### Parameter

| Required Parameter | Description                                               | Type |
| ------------------ | --------------------------------------------------------- | ---- |
| LatLng             | Latitude and longitude to be set as the center of the map | JSON |

#### Example

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

### getCenter

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

```javascript
mapInstance.getCenter();
```

#### Return

The map's geographical center point

#### Example

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fatos-doc.fatos.biz/fatos-api/map/map-control/center.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
