---
title: "init(lookingAt:forViewSize:allowPitch:)"
framework: mapkit
role: symbol
role_heading: Initializer
path: "mapkit/mkmapcamera/init(lookingat:forviewsize:allowpitch:)"
---

# init(lookingAt:forViewSize:allowPitch:)

Returns a new camera object using the specified map item, view size, and pitch.

## Declaration

```swift
convenience init(lookingAt mapItem: MKMapItem, forViewSize viewSize: CGSize, allowPitch: Bool)
```

## Parameters

- `mapItem`: An doc://com.apple.mapkit/documentation/MapKit/MKMapItem that indicates the location of the camera.
- `viewSize`: The view’s size.
- `allowPitch`: A Boolean value that indicates if the camera should the use map’s pitch angle.

## See Also

### Getting a camera object

- [init(lookingAtCenter:fromEyeCoordinate:eyeAltitude:)](mapkit/mkmapcamera/init(lookingatcenter:fromeyecoordinate:eyealtitude:).md)
- [init(lookingAtCenter:fromDistance:pitch:heading:)](mapkit/mkmapcamera/init(lookingatcenter:fromdistance:pitch:heading:).md)
