---
title: "setCameraZoomRange(_:animated:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmapview/setcamerazoomrange(_:animated:)"
---

# setCameraZoomRange(_:animated:)

Sets the camera zoom range for the map view, specifying whether to use animation.

## Declaration

```swift
func setCameraZoomRange(_ cameraZoomRange: MKMapView.CameraZoomRange?, animated: Bool)
```

## Parameters

- `cameraZoomRange`: The doc://com.apple.mapkit/documentation/MapKit/MKMapView/CameraZoomRange-swift.class.
- `animated`: A Boolean value that indicates whether the framework animates the transition of the map view to the new zoom range.

## See Also

### Constraining the map view

- [setCameraBoundary(_:animated:)](mapkit/mkmapview/setcameraboundary(_:animated:).md)
- [cameraBoundary](mapkit/mkmapview/cameraboundary-swift.property.md)
- [cameraZoomRange](mapkit/mkmapview/camerazoomrange-swift.property.md)
- [MKMapView.CameraBoundary](mapkit/mkmapview/cameraboundary-swift.class.md)
- [MKMapView.CameraZoomRange](mapkit/mkmapview/camerazoomrange-swift.class.md)
