<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/Map/setCenterAnimated",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instm/mapkit.Map/setCenterAnimated"
  },
  "title" : "setCenterAnimated(coordinate, animated)"
}
-->

# setCenterAnimated(coordinate, animated)

Centers the map to the provided coordinate, with optional animation.

```
setCenterAnimated(coordinate: CoordinateData, animated?: boolean): Map;
```

## Parameters

`coordinate`

The map’s new [`center`](/documentation/MapKitJS/Map/center).

`animate`

A Boolean value that determines whether MapKit JS animates the center change. The default value is `true`.

## Return Value

Returns the map object.

## Discussion

By default, MapKit JS animates the pan.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)