One Logo Pool Ball
_MapKit_SwiftUI · IOS API REFERENCE

MapContentBuilder

struct · iOS 17.0+ · SDK 27.1

@resultBuilder struct MapContentBuilder

A result builder that creates map content content from closures. The `buildBlock` methods in this type create ``MapContent`` instances based on the number and types of sources provided as parameters. 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.

Members (1)

static · iOS 17.0+

buildBlock

TypeScript
static buildBlock(): EmptyMapContent
Swift declaration
static func buildBlock() -> EmptyMapContent

Creates an empty map content containing no statements.

Skipped declarations

7 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MapContentBuilder.buildExpression(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Content)

MapContentBuilder.buildBlock(_:)

This declaration needs Swift generic type arguments. (no canonical witness for C)

MapContentBuilder.buildIf(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Content)

MapContentBuilder.buildEither(first:)

This declaration needs Swift generic type arguments. (no canonical witness for TrueContent)

MapContentBuilder.buildEither(second:)

This declaration needs Swift generic type arguments. (no canonical witness for FalseContent)

MapContentBuilder.buildLimitedAvailability(_:)

This protocol needs associated types that cannot yet cross the bridge.

MapContentBuilder.buildBlock(_:)

Swift parameter packs cannot cross the bridge.

All _MapKit_SwiftUI types →