Editar

Compartilhar via


MKMapView.Camera Property

Definition

Defines the perspective of the map.

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

Property Value

The default value is null.

Attributes

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