This cross-import overlay brings MapKit into SwiftUI, letting you build declarative map views with customizable annotations and type-erased map content across iOS, macOS, tvOS, watchOS, and visionOS. You place content such as MapMarker, MapPin, MapAnnotation, MapCircle, MapPolygon, and MapPolyline, and control the viewport through MapCamera, MapCameraBounds, and MapCameraPosition. You configure presentation and behavior with MapStyle, MapInteractionModes, MapUserTrackingMode, and PointOfInterestCategories, and respond to selection and user position using MapSelection, MapFeature, MapProxy, and UserLocation.
Map Content 3
Protocols that define the content you place on a map and how it participates in selection.
- PrDynamicMapContentiOS 17.0+A type that produces map content dynamically from an underlying collection of data.
- PrMapAnnotationProtocoliOS 14.0+A type that represents a custom annotation placed at a coordinate on a map.
- PrMapSelectableiOS 17.0+Represents a selection of either a map feature, or map content with a given tag value.
Annotations and Overlays 6
Markers, pins, and shapes you add to a map to highlight places and regions.
- StMapMarkerA balloon-shaped marker that displays a title and icon at a coordinate on the map.
- StMapPinA pin that marks a coordinate on the map.
- StMapAnnotationAn annotation that displays a custom SwiftUI view at a coordinate on the map.
- StMapCircleiOS 17.0+A circular overlay with a configurable radius that you center on a geographic coordinate.
- StMapPolygoniOS 17.0+A closed polygon overlay.
- StMapPolylineiOS 17.0+An open polygon overlay consisting of one or more connected line segments.
Camera and Viewport 6
Types that describe and constrain the map's framing, position, and update behavior.
- StMapCameraiOS 17.0+Defines a virtual viewpoint above the map surface.
- StMapCameraBoundsiOS 17.0+Defines an optional boundary of an area within which the map’s center needs to
- StMapCameraPositioniOS 17.0+How to position the map's camera within the map.
- StMapCameraUpdateContextiOS 17.0+A structure that provides information about the map's camera during an update.
- StMapCameraUpdateFrequencyiOS 17.0+A structure that specifies how often the map reports camera updates.
- StMapProxyiOS 17.0+A proxy for accessing sizing information about a given map view.
Style and Interaction 5
Configuration values that control a map's appearance, allowed gestures, and points of interest.
- StMapStyleiOS 17.0+A Style that can be applied to a Map.
- StMapInteractionModesiOS 14.0+The ways a user can interact with a map.
- EnMapUserTrackingModeAn enumeration of modes that control how a map follows the user's location and heading.
- StPointOfInterestCategoriesiOS 17.0+Point of Interest categories to be shown.
- StMapItemDetailSelectionAccessoryStyleThe map item detail selection accessory style
Selection and User Position 3
Types for tracking the user's location and responding to selected map features.
- StMapFeatureiOS 17.0+Represents a tappable map feature.
- StMapSelectioniOS 18.0+Can represent a tag value or a `MapFeature`.
- StUserLocationiOS 17.0+Information about the current location of the user.
Structures 17
- StAnnotationiOS 17.0+A customizable annotation that marks a map location.
- StAnyMapContentiOS 17.5+A type-erased map content.
- StDefaultUserAnnotationContentiOS 17.0+You don't use this type directly. Instead MapKit creates this type on
- StEmptyMapContentiOS 17.0+A piece of map content that doesn't contain any content.
- StLookAroundPreview
- StMapiOS 14.0+
- StMapCompassiOS 17.0+A view that reflects the current orientation of the associated `Map`.
- StMapContentBuilderiOS 17.0+A result builder that creates map content content from closures.
- StMapContentViewiOS 17.0+
- StMapPitchToggleA button that will set the asosciated pitch of the associated `Map` to a
- StMapReaderiOS 17.0+A container view that defines its contents as a function of information about the first contained map.
- StMapScaleViewDisplays a legend with distance information for the associated `Map`
- StMapSelectableContentView
- StMapUserLocationButtoniOS 17.0+A button that will set the framing of the associated `Map` to the User Location
- StMarkeriOS 17.0+A balloon-shaped annotation that marks a map location.
- StTupleMapContentiOS 17.0+
Show 1 more
- StUserAnnotationiOS 17.0+Displays the current location of the user on the map.
Protocols 1
- PrMapContentiOS 17.0+