MKMapView.Camera Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- <xref:MapKit.MKMapView.SetCamera>
- PitchEnabled