Type Method

cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:

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

Declaration

+ (instancetype)cameraLookingAtCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate fromDistance:(CLLocationDistance)distance pitch:(CGFloat)pitch heading:(CLLocationDirection)heading;

Parameters

centerCoordinate

The coordinate point on which the map should be centered.

distance

The line-of-sight distance from the camera to the center coordinate of the map.

pitch

The viewing angle of the camera, measured in degrees. A value of 0 results in a camera pointed straight down at the map. Angles greater than 0 result in a camera that is pitched toward the horizon by the specified number of degrees.

heading

The heading of the camera (measured in degrees) relative to true north. The value 0 means that the top edge of the map view corresponds to true north. The value 90 means the top of the map is pointing due east. The value 180 means the top of the map points due south, and so on.

Return Value

A new camera object initialized with the specified information.

Discussion

The altitude of the camera is obtained by multiplying distance by the cosine of the pitch value.

See Also

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.