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

# Map

A view that displays an embedded map interface.

```
@MainActor @preconcurrency struct Map<Content> where Content : View
```

## Overview

Use this SwiftUI view to display a `Map` with markers, annotations, and custom content you provide. You can configure the `Map` to optionally display the user’s location, track a location, and display various controls to allow them to interact with and control the map’s display. The following example displays a map of downtown San Francisco that shows different markers, and an annotation with custom view content at specific locations:

```swift
    struct ContentView: View {
        var body: some View {
            Map {
                Marker("San Francisco City Hall", coordinate: cityHallLocation)
                    .tint(.orange)
                Marker("San Francisco Public Library", coordinate: publicLibraryLocation)
                    .tint(.blue)
                Annotation("Diller Civic Center Playground", coordinate: playgroundLocation) {
                    ZStack {
                        RoundedRectangle(cornerRadius: 5)
                            .fill(Color.yellow)
                        Text("🛝")
                            .padding(5)
                    }
                }
            }
            .mapControlVisibility(.hidden)
        }
    }
```

You create markers, annotations, and overlays using [`MapContentBuilder`](/documentation/MapKit/MapContentBuilder) with any of several [`MapContent`](/documentation/MapKit/MapContent) types including:

- [`Annotation`](/documentation/MapKit/Annotation)
- [`UserAnnotation`](/documentation/MapKit/UserAnnotation)
- [`Marker`](/documentation/MapKit/Marker)
- [`MapCircle`](/documentation/MapKit/MapCircle)
- [`MapPolygon`](/documentation/MapKit/MapPolygon)
- [`MapPolyline`](/documentation/MapKit/MapPolyline)

You can also add a variety of controls to allow a person to interact with the map to change the map’s scale, display or hide the device’s current location, and so on:

- [`MapCompass`](/documentation/MapKit/MapCompass)
- [`MapPitchToggle`](/documentation/MapKit/MapPitchToggle)
- [`MapPitchSlider`](/documentation/MapKit/MapPitchSlider)
- [`MapScaleView`](/documentation/MapKit/MapScaleView)
- [`MapUserLocationButton`](/documentation/MapKit/MapUserLocationButton)
- [`MapZoomStepper`](/documentation/MapKit/MapZoomStepper)

## Topics

### Creating a map

[`init(bounds:interactionModes:scope:)`](/documentation/MapKit/Map/init(bounds:interactionModes:scope:))

Creates a new, empty map with the bounds, interaction modes, and scope you provide.

[`init(bounds:interactionModes:scope:content:)`](/documentation/MapKit/Map/init(bounds:interactionModes:scope:content:))

Creates a new map with the bounds, interaction modes, scope, and content you provide.

[`init(bounds:interactionModes:selection:scope:)`](/documentation/MapKit/Map/init(bounds:interactionModes:selection:scope:)-11lec)

Creates a new, empty map with the bounds, interaction modes, a binding to a map feature, and scope you provide.

[`init(bounds:interactionModes:selection:scope:)`](/documentation/MapKit/Map/init(bounds:interactionModes:selection:scope:)-236di)

Creates a new, empty map with the bounds, interaction modes, the selected map feature, and scope you provide.

[`init(bounds:interactionModes:selection:scope:content:)`](/documentation/MapKit/Map/init(bounds:interactionModes:selection:scope:content:)-28wns)

Creates a new map with the bounds, interaction modes, selected map feature, scope, and map content you provide.

[`init(bounds:interactionModes:selection:scope:content:)`](/documentation/MapKit/Map/init(bounds:interactionModes:selection:scope:content:)-2tdbr)

Creates a new map with the bounds, interaction modes, selected value, scope, and map content you provide.

[`init(initialPosition:bounds:interactionModes:scope:)`](/documentation/MapKit/Map/init(initialPosition:bounds:interactionModes:scope:))

Creates a new, empty map with the initial camera position, bounds, interaction modes, and scope you provide.

[`init(initialPosition:bounds:interactionModes:scope:content:)`](/documentation/MapKit/Map/init(initialPosition:bounds:interactionModes:scope:content:))

Creates a new map with the initial camera position, bounds, interaction modes, scope, and map content you provide.

[`init(initialPosition:bounds:interactionModes:selection:scope:)`](/documentation/MapKit/Map/init(initialPosition:bounds:interactionModes:selection:scope:))

Creates a new, empty map with the initial camera position, bounds, interaction modes, selected map feature, and scope you provide.

[`init(initialPosition:bounds:interactionModes:selection:scope:content:)`](/documentation/MapKit/Map/init(initialPosition:bounds:interactionModes:selection:scope:content:)-9feos)

Creates a new map with the initial camera position, bounds, interaction modes, selected map feature, scope, and content you provide.

[`init(initialPosition:bounds:interactionModes:selection:scope:content:)`](/documentation/MapKit/Map/init(initialPosition:bounds:interactionModes:selection:scope:content:)-451vp)

Creates a new map with the initial camera position, bounds, interaction modes, selected map feature, scope, and content you provide.

[`init(position:bounds:interactionModes:scope:)`](/documentation/MapKit/Map/init(position:bounds:interactionModes:scope:))

Creates a new, empty map with the initial camera position, bounds, interaction modes, and scope you provide.

[`init(position:bounds:interactionModes:scope:content:)`](/documentation/MapKit/Map/init(position:bounds:interactionModes:scope:content:))

Creates a new map with the initial camera position, bounds, interaction modes, scope, and content you provide.

[`init(position:bounds:interactionModes:selection:scope:)`](/documentation/MapKit/Map/init(position:bounds:interactionModes:selection:scope:))

Creates a new map with the initial camera position, bounds, interaction modes, scope, and content you provide.

[`init(position:bounds:interactionModes:selection:scope:content:)`](/documentation/MapKit/Map/init(position:bounds:interactionModes:selection:scope:content:)-47y4p)

Creates a new map with the initial camera position, bounds, interaction modes, selected feature, scope, and content you provide.

[`init(position:bounds:interactionModes:selection:scope:content:)`](/documentation/MapKit/Map/init(position:bounds:interactionModes:selection:scope:content:)-9xq1q)

Creates a new map with the initial camera position, bounds, interaction modes, selected feature, scope, and content you provide.

[`MapInteractionModes`](/documentation/MapKit/MapInteractionModes)

Options that indicate the user interactions that the map responds to.

### Managing feature selection

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapFeatureSelectionContent(content:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapFeatureSelectionDisabled(_:)>

### Managing Look Around view presentation

  <doc://com.apple.documentation/documentation/SwiftUI/View/lookAroundViewer(isPresented:initialScene:allowsNavigation:showsRoadLabels:pointsOfInterest:onDismiss:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/lookAroundViewer(isPresented:scene:allowsNavigation:showsRoadLabels:pointsOfInterest:onDismiss:)>

### Managing map control sizing and visibility

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapControlVisibility(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapControls(_:)>

### Managing the camera

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapCameraKeyframeAnimator(trigger:keyframes:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/onMapCameraChange(frequency:_:)-2pcga>

  <doc://com.apple.documentation/documentation/SwiftUI/View/onMapCameraChange(frequency:_:)>

### Setting the namespace Identifier

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapScope(_:)>

### Setting the map style

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapStyle(_:)>

### Deprecated

[Deprecated Symbols](/documentation/MapKit/deprecated-symbols)

Map protocols and view modifiers that are no longer supported.

### Displaying place information

  <doc://com.apple.documentation/documentation/SwiftUI/View/mapFeatureSelectionAccessory(_:)>

[`mapItemDetailSelectionAccessory(_:)`](/documentation/MapKit/MapContent/mapItemDetailSelectionAccessory(_:))

Specifies the selection accessory to display for the selected map item content.



---

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)