MKMapView.Camera MKMapView.Camera Property

Definition

Defines the perspective of the map.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[get: ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[set: ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[get: Foundation.Export("camera", ObjCRuntime.ArgumentSemantic.Copy)]
[set: Foundation.Export("setCamera:", ObjCRuntime.ArgumentSemantic.Copy)]
public virtual MapKit.MKMapCamera Camera { get; set; }
member this.Camera : MapKit.MKMapCamera with get, set

Property Value

The default value is null.

Remarks

The following example shows how this property can be set to provide 3D imagery:


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;

Applies to

See also