An MKMapCamera object describes a virtual camera that you use to define the appearance of the map. A camera object creates a virtual viewpoint above the map surface and affects how the map renders its tiles and other content. You use a camera object to specify the location of the camera on the map, the compass heading that corresponds to the camera’s viewing direction, the pitch of the camera relative to the map perpendicular, and the camera’s altitude above the map. These factors let you create a map view that is not just flat but offers a more 3D-like experience.


After creating an instance of this class, configure it with the desired attributes and assign it to your map view. When you assign a camera to your map view, the map centers the map using the value in your camera object’s centerCoordinate property, updating the map’s own region information in the process. The map also takes the camera’s the pitch and altitude into account when calculating the visible region, ensuring that the region always encompasses the visible content on the map.


Getting a Camera Object

Configuring the Viewing Angle

var centerCoordinate: CLLocationCoordinate2D

The map coordinate at the center of the map view.

var heading: CLLocationDirection

The heading of the camera (measured in degrees) relative to true north.

var pitch: CGFloat

The viewing angle of the camera, measured in degrees.

var altitude: CLLocationDistance

The altitude above the ground, measured in meters.


Inherits From