<!--
{
  "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/MapContent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "MapKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:15_MapKit_SwiftUI0A7ContentP"
  },
  "title" : "MapContent"
}
-->

# MapContent

A protocol used to construct map content such as controls, markers, and annotations.

```
@MainActor @preconcurrency protocol MapContent
```

## Topics

### Accessing the view body

[`body`](/documentation/MapKit/MapContent/body-swift.property)

The content and behavior of the view.

### Supplying annotation titles

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

Sets the visibility of titles for markers and annotations.

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

Sets the visibility of subtitles for markers and annotations.

### Setting the content style

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

Specifies the shape style used to fill content in drawing map overlays.

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

The tint shape style to apply to map content.

### Setting stroke properties

[`stroke(_:lineWidth:)`](/documentation/MapKit/MapContent/stroke(_:lineWidth:))

Applies the given shape style to drawn map overlays using the line width you specify.

[`stroke(_:style:)`](/documentation/MapKit/MapContent/stroke(_:style:))

Applies the given shape style to drawn map overlays using the stroke style you specify.

[`stroke(lineWidth:)`](/documentation/MapKit/MapContent/stroke(lineWidth:))

Applies the given stoke drawn map overlays using the line width you specify.

[`strokeStyle(style:)`](/documentation/MapKit/MapContent/strokeStyle(style:))

Applies the given stroke style to drawn map overlays.

### Setting the overlay level

[`mapOverlayLevel(level:)`](/documentation/MapKit/MapContent/mapOverlayLevel(level:))

Specifies the position of overlays relative to other map content.

### Associated types

[`Body`](/documentation/MapKit/MapContent/Body-swift.associatedtype)

The content and behavior of the view.

### Displaying place information

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

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

## Relationships

### Conforming Types

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

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

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

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

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

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

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

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

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

### Inherited By

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

---

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)