---
title: MapPitchToggle
framework: mapkit
role: symbol
role_heading: Structure
path: mapkit/mappitchtoggle
---

# MapPitchToggle

A button that sets the pitch of the associated map.

## Declaration

```swift
@MainActor @preconcurrency struct MapPitchToggle
```

## Overview

Overview The MapPitchToggle control sets the pitch of the associated map to a pleasing angle if flat, or returns the map to flat if pitched. You can use this control in conjunction with Map as a standalone view, as this example shows:     struct MyMapView: View {         @Namespace var mapScope

var body: some View {             VStack {                 Map(scope: mapScope)                 MapPitchToggle(scope: mapScope)             }             .mapScope(mapScope)         }     } Alternatively, use MapPitchToggle in conjunction with the mapControls(_:) modifier. For example:     Map()         .mapControls {             MapPitchToggle()         }

## Topics

### Creating a map pitch toggle

- [init(scope:)](mapkit/mappitchtoggle/init(scope:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [View](swiftui/view.md)

## See Also

### Map controls

- [MapCompass](mapkit/mapcompass.md)
- [MapLocationCompass](mapkit/maplocationcompass.md)
- [MapPitchSlider](mapkit/mappitchslider.md)
- [MapScaleView](mapkit/mapscaleview.md)
- [MapUserLocationButton](mapkit/mapuserlocationbutton.md)
- [MapZoomStepper](mapkit/mapzoomstepper.md)
