One Logo Pool Ball
Additional SDK Modules · IOS API REFERENCE

_MapKit_SwiftUI

Explore _MapKit_SwiftUI types and the APIs available through One's generated iOS bindings.

74 types

126 callable entries

100 skipped

56% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

Annotation

struct · iOS 17.0+

Annotation.Body

typealias · iOS 17.0+

AnyMapContent

struct · iOS 17.5+

AnyMapContent.Body

typealias · iOS 17.5+

CLLocationCoordinate2D.AnimatableData

typealias · iOS 17.0+

DefaultUserAnnotationContent

struct · iOS 17.0+

DefaultUserAnnotationContent.Body

typealias · iOS 17.0+

DynamicMapContent

protocol · iOS 17.0+

EmptyMapContent

struct · iOS 17.0+

EmptyMapContent.Body

typealias · iOS 17.0+

ForEach.Body

typealias · iOS 17.0+

LookAroundPreview

struct · iOS 17.0+

LookAroundPreview.Body

typealias · iOS 17.0+

Map

struct · iOS 14.0+

Map.Body

typealias · iOS 14.0+

MapAnnotation

struct · iOS 14.0+ · Deprecated in iOS 17.0

MapAnnotationProtocol

protocol · iOS 14.0+

MapCamera

struct · iOS 17.0+

MapCameraBounds

struct · iOS 17.0+

MapCameraPosition

struct · iOS 17.0+

MapCameraUpdateContext

struct · iOS 17.0+

MapCameraUpdateFrequency

struct · iOS 17.0+

MapCircle

struct · iOS 17.0+

MapCircle.Body

typealias · iOS 17.0+

MapCompass

struct · iOS 17.0+

MapCompass.Body

typealias · iOS 17.0+

MapContent

protocol · iOS 17.0+

MapContentBuilder

struct · iOS 17.0+

MapContentView

struct · iOS 17.0+

MapContentView.Body

typealias · iOS 17.0+

MapFeature

struct · iOS 17.0+

MapFeature.FeatureKind

struct · iOS 17.0+

MapInteractionModes

struct · iOS 14.0+

MapInteractionModes.ArrayLiteralElement

typealias · iOS 14.0+

MapInteractionModes.Element

typealias · iOS 14.0+

MapInteractionModes.RawValue

typealias · iOS 14.0+

MapItemDetailSelectionAccessoryStyle

struct · iOS 18.0+

MapItemDetailSelectionAccessoryStyle.CalloutStyle

struct · iOS 18.0+

MapMarker

struct · iOS 14.0+ · Deprecated in iOS 17.0

MapPin

struct · iOS 14.0+ · Deprecated in iOS 16.0

MapPitchToggle

struct · iOS 17.0+

MapPitchToggle.Body

typealias · iOS 17.0+

MapPolygon

struct · iOS 17.0+

MapPolygon.Body

typealias · iOS 17.0+

MapPolyline

struct · iOS 17.0+

MapPolyline.Body

typealias · iOS 17.0+

MapPolyline.ContourStyle

struct · iOS 17.0+

MapProxy

struct · iOS 17.0+

MapReader

struct · iOS 17.0+

MapReader.Body

typealias · iOS 17.0+

MapScaleView

struct · iOS 17.0+

MapScaleView.Body

typealias · iOS 17.0+

MapSelectable

protocol · iOS 17.0+

MapSelectableContentView

struct · iOS 17.0+

MapSelectableContentView.Body

typealias · iOS 17.0+

MapSelection

struct · iOS 18.0+

MapStyle

struct · iOS 17.0+

MapStyle.Elevation

struct · iOS 17.0+

MapStyle.StandardEmphasis

struct · iOS 17.0+

MapUserLocationButton

struct · iOS 17.0+

MapUserLocationButton.Body

typealias · iOS 17.0+

MapUserTrackingMode

enum · iOS 14.0+ · Deprecated in iOS 17.0

Marker

struct · iOS 17.0+

Marker.Body

typealias · iOS 17.0+

ModifiedContent.Data

typealias · iOS 17.0+

Never.MapContentValue

typealias · iOS 17.0+

Optional.Body

typealias · iOS 17.0+

PointOfInterestCategories

struct · iOS 17.0+

PointOfInterestCategories.ArrayLiteralElement

typealias · iOS 17.0+

TupleMapContent

struct · iOS 17.0+

TupleMapContent.Body

typealias · iOS 17.0+

UserAnnotation

struct · iOS 17.0+

UserAnnotation.Body

typealias · iOS 17.0+

UserLocation

struct · iOS 17.0+

Functions and constants

get · iOS 17.0+

value

TypeScript
get value(): Promise<unknown>
Swift declaration
@MainActor @preconcurrency var value: T
set · iOS 17.0+

value

TypeScript
setValue(value: unknown): Promise<void>
Swift declaration
@MainActor @preconcurrency var value: T
init · iOS 17.0+

init

TypeScript
static initInitialPositionBoundsInteractionModesScope(initialPosition: MapCameraPosition, bounds?: (MapCameraBounds) | null, interactionModes?: MapInteractionModes, scope?: (_SwiftUICore_Namespace_ID) | null): Promise<Map<MapContentView<never, EmptyMapContent>>>
Swift declaration
@MainActor @preconcurrency init(initialPosition: MapCameraPosition, bounds: MapCameraBounds? = nil, interactionModes: MapInteractionModes = .all, scope: Namespace.ID? = nil) where Content == MapContentView<Never, EmptyMapContent>

Creates a map with no map content. - Parameters: - initialPosition: The initial position of the map's camera. - bounds: The bounds to restrict the map's camera movement to. - interactionModes: The ways users are allowed to interact with the map. - scope: The scope to associate with the map.

init · iOS 17.0+

init

TypeScript
static initInitialPositionBoundsInteractionModesSelectionScope(initialPosition: MapCameraPosition, bounds: (MapCameraBounds) | null, interactionModes: MapInteractionModes, selection: _SwiftUICore_Binding<(MapFeature) | null>, scope?: (_SwiftUICore_Namespace_ID) | null): Promise<Map<MapContentView<MapFeature, EmptyMapContent>>>
Swift declaration
@MainActor @preconcurrency init(initialPosition: MapCameraPosition, bounds: MapCameraBounds? = nil, interactionModes: MapInteractionModes = .all, selection: Binding<MapFeature?>, scope: Namespace.ID? = nil) where Content == MapContentView<MapFeature, EmptyMapContent>

Creates a map with no map content. - Parameters: - initialPosition: The initial position of the map's camera. - bounds: The bounds to restrict the map's camera movement to. - interactionModes: The ways users are allowed to interact with the map. - selection: A binding to the selected map feature. - scope: The scope to associate with the map.

init · iOS 14.0+ · Deprecated in iOS 17.0

init

TypeScript
static initCoordinateRegionInteractionModesShowsUserLocationUserTrackingMode(coordinateRegion: _SwiftUICore_Binding<_MapKit_MKCoordinateRegion>, interactionModes?: MapInteractionModes, showsUserLocation?: boolean, userTrackingMode?: (_SwiftUICore_Binding<MapUserTrackingMode>) | null): Promise<Map<SDKHandle>>
Swift declaration
@MainActor @preconcurrency init(coordinateRegion: Binding<MKCoordinateRegion>, interactionModes: MapInteractionModes = .all, showsUserLocation: Bool = false, userTrackingMode: Binding<MapUserTrackingMode>? = nil) where Content == _DefaultMapContent

Creates an instance showing a specific region and optionally configuring available interactions, user location and tracking behavior. - Parameters: - coordinateRegion: The coordinate region to display. - interactions: The types of user interactions that should be enabled. - showsUserLocation: Whether to display the user's location in this Map or not. Only takes effect if the user has authorized the app to access their location. - userTrackingMode: How the map should respond to user location updates

init · iOS 17.0+

init

TypeScript
static initBoundsInteractionModesScope(bounds?: (MapCameraBounds) | null, interactionModes?: MapInteractionModes, scope?: (_SwiftUICore_Namespace_ID) | null): Promise<Map<MapContentView<never, EmptyMapContent>>>
Swift declaration
@MainActor @preconcurrency init(bounds: MapCameraBounds? = nil, interactionModes: MapInteractionModes = .all, scope: Namespace.ID? = nil) where Content == MapContentView<Never, EmptyMapContent>

Creates a map with no map content. - Parameters: - bounds: The bounds to restrict the map's camera movement to. - interactionModes: The ways users are allowed to interact with the map. - scope: The scope to associated with the map.

init · iOS 17.0+

init

TypeScript
static initBoundsInteractionModesSelectionScope(bounds: (MapCameraBounds) | null, interactionModes: MapInteractionModes, selection: _SwiftUICore_Binding<(MapFeature) | null>, scope?: (_SwiftUICore_Namespace_ID) | null): Promise<Map<MapContentView<MapFeature, EmptyMapContent>>>
Swift declaration
@MainActor @preconcurrency init(bounds: MapCameraBounds? = nil, interactionModes: MapInteractionModes = .all, selection: Binding<MapFeature?>, scope: Namespace.ID? = nil) where Content == MapContentView<MapFeature, EmptyMapContent>

Creates a map with no map content. - Parameters: - bounds: The bounds to restrict the map's camera movement to. - interactionModes: The ways users are allowed to interact with the map. - selection: A binding to the selected map feature. - scope: The scope to associate with the map.

init · iOS 17.0+

init

TypeScript
static initBoundsInteractionModesSelectionScope83905(bounds: (MapCameraBounds) | null, interactionModes: MapInteractionModes, selection: _SwiftUICore_Binding<(number) | null>, scope?: (_SwiftUICore_Namespace_ID) | null): Promise<Map<MapContentView<number, EmptyMapContent>>>
Swift declaration
@MainActor @preconcurrency init<SelectedValue>(bounds: MapCameraBounds? = nil, interactionModes: MapInteractionModes = .all, selection: Binding<SelectedValue?>, scope: Namespace.ID? = nil) where Content == MapContentView<SelectedValue, EmptyMapContent>, SelectedValue : Hashable

Creates a map with no map content. - Parameters: - bounds: The bounds to restrict the map's camera movement to. - interactionModes: The ways users are allowed to interact with the map. - selection: A binding to the tag value of the selected map content. - scope: The scope to associate with the map.

init · iOS 14.0+ · Deprecated in iOS 17.0

init

TypeScript
static initMapRectInteractionModesShowsUserLocationUserTrackingMode(mapRect: _SwiftUICore_Binding<_MapKit_MKMapRect>, interactionModes?: MapInteractionModes, showsUserLocation?: boolean, userTrackingMode?: (_SwiftUICore_Binding<MapUserTrackingMode>) | null): Promise<Map<SDKHandle>>
Swift declaration
@MainActor @preconcurrency init(mapRect: Binding<MKMapRect>, interactionModes: MapInteractionModes = .all, showsUserLocation: Bool = false, userTrackingMode: Binding<MapUserTrackingMode>? = nil) where Content == _DefaultMapContent

Creates an instance showing a specific region and optionally configuring available interactions, user location and tracking behavior. - Parameters: - mapRect: The map rect to display. - interactions: The types of user interactions that should be enabled. - showsUserLocation: Whether to display the user's location in this Map or not. Only takes effect if the user has authorized the app to access their location. - userTrackingMode: How the map should respond to user location updates

init · iOS 17.0+

init

TypeScript
static initPositionBoundsInteractionModesScope(position: _SwiftUICore_Binding<MapCameraPosition>, bounds?: (MapCameraBounds) | null, interactionModes?: MapInteractionModes, scope?: (_SwiftUICore_Namespace_ID) | null): Promise<Map<MapContentView<never, EmptyMapContent>>>
Swift declaration
@MainActor @preconcurrency init(position: Binding<MapCameraPosition>, bounds: MapCameraBounds? = nil, interactionModes: MapInteractionModes = .all, scope: Namespace.ID? = nil) where Content == MapContentView<Never, EmptyMapContent>

Creates a map with no map content. - Parameters: - position: A binding specifying how to position the map camera. - bounds: The bounds to restrict the map's camera movement to. - interactionModes: The ways users are allowed to interact with the map. - scope: The scope to associate with the map.

init · iOS 17.0+

init

TypeScript
static initPositionBoundsInteractionModesSelectionScope(position: _SwiftUICore_Binding<MapCameraPosition>, bounds: (MapCameraBounds) | null, interactionModes: MapInteractionModes, selection: _SwiftUICore_Binding<(MapFeature) | null>, scope?: (_SwiftUICore_Namespace_ID) | null): Promise<Map<MapContentView<MapFeature, EmptyMapContent>>>
Swift declaration
@MainActor @preconcurrency init(position: Binding<MapCameraPosition>, bounds: MapCameraBounds? = nil, interactionModes: MapInteractionModes = .all, selection: Binding<MapFeature?>, scope: Namespace.ID? = nil) where Content == MapContentView<MapFeature, EmptyMapContent>

Creates a map with no map content. - Parameters: - position: A binding specifying how to position the map camera. - bounds: The bounds to restrict the map's camera movement to. - interactionModes: The ways users are allowed to interact with the map. - selection: A binding to the tag value of the selected map content. - scope: The scope to associate with the map.

get · iOS 18.0+

value

TypeScript
get value(): (number) | null
Swift declaration
var value: SelectionValue? { get }
get · iOS 18.0+

feature

TypeScript
get feature(): (MapFeature) | null
Swift declaration
var feature: MapFeature? { get }

Selecting the given map feature.

init · iOS 18.0+

init

TypeScript
static init(feature?: (MapFeature) | null): MapSelection<number>
Swift declaration
init(_ feature: MapFeature?)
init · iOS 18.0+

init

TypeScript
static init72414(value: number): MapSelection<number>
Swift declaration
init(_ value: SelectionValue)
init · iOS 17.0+

init

TypeScript
static initAnchor(anchor?: _SwiftUICore_UnitPoint): Promise<UserAnnotation<_SwiftUICore_EmptyView>>
Swift declaration
@MainActor @preconcurrency init(anchor: UnitPoint = .center) where Content == EmptyView

Displays the current location of the user using the system styled user location puck. - Parameter anchor: How to anchor the user location puck around the user's location.

init · iOS 17.0+

init

TypeScript
static init(): Promise<UserAnnotation<DefaultUserAnnotationContent>>
Swift declaration
@MainActor @preconcurrency init() where Content == DefaultUserAnnotationContent

Displays the current location of the user using the MapKit default style and behavior. The visual display varies with the level of authorization the user grants your app.

init · iOS 17.0+

init

TypeScript
static initItem(item: _MapKit_MKMapItem): Promise<Marker<_SwiftUICore_Text>>
Swift declaration
@MainActor @preconcurrency init(item: MKMapItem) where Label == Text

Creates a marker for a given map item using a MapKi-provided label. MapKit will compose a label using available information, such as the `name` property. - Parameters: - item: The map item to display.

init · iOS 17.0+

init

TypeScript
static initCoordinate(titleResource: _Foundation_LocalizedStringResource, coordinate: { latitude: number; longitude: number }): Promise<Marker<_SwiftUICore_Text>>
Swift declaration
@MainActor @preconcurrency init(_ titleResource: LocalizedStringResource, coordinate: CLLocationCoordinate2D) where Label == Text

Creates a marker at the given location. - Parameters: - titleResource: The localized string for the title. - coordinate: The coordinate to display the marker at.

init · iOS 17.0+

init

TypeScript
static initCoordinate97602(titleKey: _SwiftUICore_LocalizedStringKey, coordinate: { latitude: number; longitude: number }): Promise<Marker<_SwiftUICore_Text>>
Swift declaration
@MainActor @preconcurrency init(_ titleKey: LocalizedStringKey, coordinate: CLLocationCoordinate2D) where Label == Text

Creates a marker at the given location. - Parameters: - titleKey: The localized string key to lookup the title under. - coordinate: The coordinate to display the marker at.

init · iOS 17.0+

init

TypeScript
static initCoordinate34649(title: string, coordinate: { latitude: number; longitude: number }): Promise<Marker<_SwiftUICore_Text>>
Swift declaration
@MainActor @preconcurrency init<S>(_ title: S, coordinate: CLLocationCoordinate2D) where Label == Text, S : StringProtocol

Creates a marker at the given location. - Parameters: - title: The title of the marker. - coordinate: The coordinate to display the marker at.

get · iOS 18.0+

mapFeature

TypeScript
get mapFeature(): (MapFeature) | null
Swift declaration
var mapFeature: MapFeature? { get }
get · iOS 17.0+ · Deprecated in iOS 18.0

feature

TypeScript
get feature(): MapFeature
Swift declaration
var feature: MapFeature { get }
init · iOS 17.0+

init

TypeScript
static init(feature: MapFeature): _MapKit_MKMapItemRequest
Swift declaration
convenience init(feature: MapFeature)
get · iOS 17.0+

animatableData

TypeScript
get animatableData(): _SwiftUICore_AnimatablePair<number, number>
Swift declaration
var animatableData: AnimatablePair<CLLocationDegrees, CLLocationDegrees> { get set }

The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.

set · iOS 17.0+

animatableData

TypeScript
set animatableData(value: _SwiftUICore_AnimatablePair<number, number>)
Swift declaration
var animatableData: AnimatablePair<CLLocationDegrees, CLLocationDegrees> { get set }

The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.

Skipped declarations

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

PointOfInterestCategories.including(_:)

A variable number of Swift arguments is not supported.

PointOfInterestCategories.excluding(_:)

A variable number of Swift arguments is not supported.

PointOfInterestCategories.init(arrayLiteral:)

A variable number of Swift arguments is not supported.

MapPitchToggle.body

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

MapContent.tint(_:)

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

MapContent.annotationTitles(_:)

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

MapContent.annotationSubtitles(_:)

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

MapContent.mapItemDetailSelectionAccessory(_:)

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

Marker.init(coordinate:label:)

callback cannot propagate synchronous failure

Marker.init(_:monogram:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:monogram:coordinate:)' requires the types 'AnyView' and 'Label<Text, Text>' be equivalent

Marker.init(_:monogram:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:monogram:coordinate:)' requires the types 'AnyView' and 'Label<Text, Text>' be equivalent

Marker.init(_:monogram:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:monogram:coordinate:)' requires the types 'AnyView' and 'Label<Text, Text>' be equivalent

Marker.init(_:systemImage:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:systemImage:coordinate:)' requires the types 'AnyView' and 'Label<Text, Image>' be equivalent

Marker.init(_:systemImage:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:systemImage:coordinate:)' requires the types 'AnyView' and 'Label<Text, Image>' be equivalent

Marker.init(_:systemImage:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:systemImage:coordinate:)' requires the types 'AnyView' and 'Label<Text, Image>' be equivalent

Marker.init(_:image:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:image:coordinate:)' requires the types 'AnyView' and 'Label<Text, Image>' be equivalent

Marker.init(_:image:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:image:coordinate:)' requires the types 'AnyView' and 'Label<Text, Image>' be equivalent

Marker.init(_:image:coordinate:)

The iOS SDK compiler rejected this binding: initializer 'init(_:image:coordinate:)' requires the types 'AnyView' and 'Label<Text, Image>' be equivalent

UserAnnotation.init(anchor:content:)

callback cannot propagate synchronous failure

UserAnnotation.init(anchor:content:)

callback cannot propagate synchronous failure

DefaultUserAnnotationContent.body

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

MapAnnotation.init(coordinate:anchorPoint:content:)

callback cannot propagate synchronous failure

Map.init(mapRect:interactionModes:showsUserLocation:userTrackingMode:annotationItems:annotationContent:)

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

Map.init(coordinateRegion:interactionModes:showsUserLocation:userTrackingMode:annotationItems:annotationContent:)

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

Map.body

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

Map.init(bounds:interactionModes:scope:content:)

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

Map.init(initialPosition:bounds:interactionModes:scope:content:)

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

Map.init(position:bounds:interactionModes:scope:content:)

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

Map.init(bounds:interactionModes:selection:scope:content:)

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

Map.init(initialPosition:bounds:interactionModes:selection:scope:content:)

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