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

# setRotationAnimated(degrees, animated)

Changes the map’s rotation setting to the number of specified degrees.

```
setRotationAnimated(degrees: number, animated?: boolean): Map | null;
```

## Parameters

`degrees`

The map’s rotation, in degrees.

`animate`

A Boolean value that determines whether the rotation change animates. The default value is `true`.

## Return Value

Returns the map object.

## Discussion

By default, MapKit JS animates the rotation change. This function changes the map’s rotation even if [`isRotationEnabled`](/documentation/MapKitJS/Map/isRotationEnabled) is `false`.

---

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)