<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MapCamera",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "MapKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:15_MapKit_SwiftUI0A6CameraV"
  },
  "title" : "MapCamera"
}
-->

# MapCamera

Defines a virtual viewpoint above the map surface.

```
struct MapCamera
```

## Overview

`MapCamera` allows you to specify the viewpoint of a [`Map`](/documentation/MapKit/Map), as well as affect how MapKit presents the map to the user.

To create a map view with a 3D perspective, `MapCamera` takes input from the camera and device:

- The location of the camera on the map.
- The compass heading to indicate the camera’s viewing direction.
- The pitch of the camera relative to the map perpendicular.
- The camera’s distance from the target point.

## Topics

### Creating a map camera

[`init(_:)`](/documentation/MapKit/MapCamera/init(_:))

Creates a map camera from the given MapKit camera object.

[`init(centerCoordinate:distance:heading:pitch:)`](/documentation/MapKit/MapCamera/init(centerCoordinate:distance:heading:pitch:))

Creates a camera using the specified distance, pitch, and heading information.

### Accessing the camera properties

[`centerCoordinate`](/documentation/MapKit/MapCamera/centerCoordinate)

The map coordinate at the center of the map view.

[`distance`](/documentation/MapKit/MapCamera/distance)

The distance from the center point of the map to the camera, in meters.

[`heading`](/documentation/MapKit/MapCamera/heading)

The heading of the camera, in degrees, relative to true North.

[`pitch`](/documentation/MapKit/MapCamera/pitch)

The viewing angle of the camera, in degrees.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)