---
title: "camera(framing:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mapproxy/camera(framing:)-uxov"
---

# camera(framing:)

Creates a camera in the context of the map that frames the given map rectangle.

## Declaration

```swift
func camera(framing rect: MKMapRect) -> MapCamera
```

## Parameters

- `rect`: The map rectangle to frame.

## Return Value

Return Value Returns a MapCamera that frames the rectangle you specified.

## See Also

### Creating a camera proxy

- [camera(framing:)](mapkit/mapproxy/camera(framing:)-1asl2.md)
- [camera(framing:allowPitch:)](mapkit/mapproxy/camera(framing:allowpitch:).md)
