Class

MKMapCamera

A virtual camera for defining the appearance of the map.

Declaration

@interface MKMapCamera : NSObject

Overview

A camera object defines a virtual viewpoint above the map surface and affects how the map is presented to the user. You use a camera object to specify the location of the camera on the map, the compass heading indicating 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 create a map view with a three-dimensional perspective.

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, MapKit 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 pitch and altitude into account when calculating the visible region, ensuring that the region always encompasses the visible content on the map.

Topics

Getting a Camera Object

+ camera

Returns a new camera object for you to configure.

+ cameraLookingAtCenterCoordinate:fromEyeCoordinate:eyeAltitude:

Returns a new camera object using the specified viewing angle information.

+ cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:

Returns a new camera object using the specified distance, pitch, and heading information.

Configuring the Viewing Angle

centerCoordinate

The map coordinate at the center of the map view.

heading

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

centerCoordinateDistance

The distance from the center point of the map to the camera, measured in meters.

Beta
pitch

The viewing angle of the camera, measured in degrees.

altitude

The altitude above the ground, measured in meters.

Deprecated

Relationships

Inherits From

See Also

Map Customization

MKCompassButton

A specialized view that displays the current compass heading for its associated map.

MKScaleView

A specialized view that displays the current scale information for its associated map.

MKAnnotation

An interface for associating your content with a specific map location.

MKUserTrackingButton

A specialized button that allows the user to toggle through the user tracking modes.

MKUserTrackingBarButtonItem

A specialized bar button item that allows the user to toggle through the user tracking modes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software