MapKit.MKMapCamera Class
The viewpoint that defines the perspective of the map.

See Also: MKMapCamera Members

Syntax

[Foundation.Register("MKMapCamera", true)]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.Mac_10_0 | ObjCRuntime.Platform.Mac_10_1 | ObjCRuntime.Platform.Mac_10_2 | ObjCRuntime.Platform.Mac_10_3 | ObjCRuntime.Platform.Mac_10_4 | ObjCRuntime.Platform.Mac_10_5 | ObjCRuntime.Platform.Mac_10_6 | ObjCRuntime.Platform.Mac_10_7 | ObjCRuntime.Platform.Mac_10_8 | ObjCRuntime.Platform.Mac_10_9 | ObjCRuntime.Platform.Mac_10_10 | ObjCRuntime.Platform.Mac_Version | ObjCRuntime.Platform.Mac_Arch64 | ObjCRuntime.Platform.Mac_Arch)]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_7_0)]
public class MKMapCamera : Foundation.NSObject, Foundation.INSCopying, Foundation.INSSecureCoding, IDisposable

Remarks

Application developers can assign a MapKit.MKMapCamera to the MKMapView.Camera property or use the MapKit.MKMapKit.MKMapView.SetCamera method to cause the MapKit.MKMapView to render at an angle, with the MKMapCamera.CenterCoordinate in the middle of the view. The MKMapView.Region and MKMapView.VisibleMapRect will be properly set based on the camera perspective.

The MapKit.MKMapView has a maximum tilt that is determined by the operating system. Setting the MKMapCamera.Altitude property to a value too low will result in the camera perspective at the height appropriate to the maximum tilt.

The following example shows how to position the camera and render 3D buildings:

C# Example

var target = new CLLocationCoordinate2D(37.7952, -122.4028);
var viewPoint = new CLLocationCoordinate2D(37.8009, -122.4100);
//Enable 3D buildings
mapView.ShowsBuildings = true;
mapView.PitchEnabled = true;

var camera = MKMapCamera.CameraLookingAtCenterCoordinate(target, viewPoint, 500);
mapView.Camera = camera;
        

Related content

Requirements

Namespace: MapKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0