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

# setCameraZoomRangeAnimated(cameraZoomRange, animated)

Changes the map’s camera zoom range with an animated transition.

```
setCameraZoomRangeAnimated(
    cameraZoomRange: CameraZoomRangeData | null,
    animated?: boolean,
): Map;
```

## Parameters

`cameraZoomRange`

A [`CameraZoomRange`](/documentation/MapKitJS/CameraZoomRange) instance, which is an object containing the [`minCameraDistance`](/documentation/MapKitJS/CameraZoomRange/minCameraDistance) and [`maxCameraDistance`](/documentation/MapKitJS/CameraZoomRange/maxCameraDistance) properties.

`animate`

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

## Return Value

Returns the containing map instance object.

## Discussion

By default, the change of zoom range animates.

---

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)