---
title: MapContentBuilder
framework: mapkit
role: symbol
role_heading: Structure
path: mapkit/mapcontentbuilder
---

# MapContentBuilder

A result builder that creates map content from closures you provide.

## Declaration

```swift
@resultBuilder struct MapContentBuilder
```

## Overview

Overview The buildBlock(_:) methods in this type create MapContent instances based on the number and types of sources you provide as parameters. You don’t use this type directly. Instead, SwiftUI annotates the content parameter of the various MapView initializers with the @MapContentBuilder annotation, implicitly calling this builder for you.

## Topics

### Map content builders

- [buildBlock()](mapkit/mapcontentbuilder/buildblock().md)
- [buildBlock(_:)](mapkit/mapcontentbuilder/buildblock(_:)-5ewn9.md)

### Conditionally building map content

- [buildEither(first:)](mapkit/mapcontentbuilder/buildeither(first:).md)
- [buildEither(second:)](mapkit/mapcontentbuilder/buildeither(second:).md)
- [buildExpression(_:)](mapkit/mapcontentbuilder/buildexpression(_:).md)
- [buildIf(_:)](mapkit/mapcontentbuilder/buildif(_:).md)
- [buildLimitedAvailability(_:)](mapkit/mapcontentbuilder/buildlimitedavailability(_:).md)

### Type Methods

- [buildBlock(_:)](mapkit/mapcontentbuilder/buildblock(_:)-4omn.md)

## See Also

### Protocols

- [DynamicMapContent](mapkit/dynamicmapcontent.md)
- [MapContent](mapkit/mapcontent.md)
- [MapContentView](mapkit/mapcontentview.md)
