
Mapkit
- 212 installs
- 297 repo stars
- Updated August 4, 2026
- vabole/apple-skills
Implement Apple MapKit maps, annotations, overlays, camera behavior, and location-aware UI in iOS and macOS client applications.
About
MapKit skill from vabole/apple-skills teaches Claude to build Apple MapKit features: MKMapView or SwiftUI Map setup, annotations, polylines, geocoding hooks, user-location flows, and performance-conscious map UX for iPhone, iPad, and Mac apps.
- MapKit map and annotation setup
- Camera, region, and zoom control
- Custom markers and overlays
- Location permission and privacy patterns
- SwiftUI and UIKit Map integration
Mapkit by the numbers
- 212 all-time installs (skills.sh)
- +3 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #425 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/vabole/apple-skills --skill mapkitAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 212 |
|---|---|
| repo stars | ★ 297 |
| Last updated | August 4, 2026 |
| Repository | vabole/apple-skills ↗ |
What it does
Implement Apple MapKit maps, annotations, overlays, camera behavior, and location-aware UI in iOS and macOS client applications.
Files
MapKit Reference
MapKit for SwiftUI — maps, annotations, and location features (iOS 26+).
Downloaded Reference Files
| File | Content |
|---|---|
| mapkit-overview.md | Full MapKit framework index |
| map.md | Map view |
| marker.md | Marker (pin-style annotations) |
| annotation.md | Custom annotations |
| mapcameraposition.md | MapCameraPosition |
| mapkit-for-swiftui.md | MapKit SwiftUI integration |
| mapfeature.md | MapFeature |
Fetching More Docs
1. Search this skill's local .md files first. 2. If the topic is not here, check the other installed Apple skills you have available by their names, descriptions, or SKILL.md frontmatter, then grep their local files. This is faster and uses less context than fetching new docs from the internet. 3. If no installed skill has the page, use the relevant documentation path from mapkit-overview.md with the sosumi.ai Markdown mirror. For example, /documentation/mapkit/mkmapview maps to https://sosumi.ai/documentation/mapkit/mkmapview.
Navigation: MapKit
Structure
Annotation
Available on: iOS 17.0+, iPadOS 17.0+, Mac Catalyst, macOS 14.0+, tvOS 17.0+, visionOS, watchOS 10.0+
A customizable annotation used to indicate a location on a map.
@MainActor @preconcurrency struct Annotation<Label, Content> where Label : View, Content : ViewOverview
Use this view to annotations in the closure you provide to the content parameter in the Map initializers.
Conforms To
Creating annotations
- init(_:coordinate:anchor:accessoryAnchor:content:)-6rxmn) Creates an annotation that displays a view at a coordinate on the map.
- init(_:coordinate:anchor:accessoryAnchor:content:)-14m3t) Creates an annotation that displays a view at a coordinate on the map.
- init(coordinate:anchor:accessoryAnchor:content:label:)) Creates an annotation that displays a view at a coordinate on the map.
- init(item:anchor:accessoryAnchor:content:)) Creates an annotation that displays a view at a coordinate on the map.
- init(_:coordinate:anchor:content:)-2w242) Creates an annotation that displays a view at a coordinate on the map.
- init(_:coordinate:anchor:content:)-6wnoh) Creates an annotation that displays a view at a coordinate on the map using a title key, coordinate, anchor location, and view you provide.
- init(coordinate:anchor:content:label:)) Creates an annotation that displays a view on the map using coordinates, anchor location, view, and label you provide.
Displaying place information
- mapItemDetailSelectionAccessory(_:)) Specifies the selection accessory to display for the selected map item content.
Initializers
- init(_:coordinate:anchor:accessoryAnchor:content:)-8wi4r) Creates an annotation that displays a view at a coordinate on the map.
- init(_:coordinate:anchor:content:)-8k419) Creates an annotation that displays a view at a coordinate on the map.
Annotations and overlays
- MapCircle A circular overlay with a configurable radius that you center on a geographic coordinate.
- MapPolygon A closed polygon overlay.
- MapPolyline An open polygon overlay consisting of one or more connected line segments.
- Marker A balloon-shaped annotation that marks a map location.
- UserAnnotation Displays the person’s current location on the map.
---
Extracted from Apple DocC JSON by apple-skills tooling. This is unofficial content. All documentation belongs to Apple Inc.
Navigation: MapKit
Structure
Map
Available on: iOS 14.0+, iPadOS 14.0+, Mac Catalyst, macOS 11.0+, tvOS 14.0+, visionOS, watchOS 7.0+
A view that displays an embedded map interface.
@MainActor @preconcurrency struct Map<Content> where Content : ViewOverview
Use this SwiftUI view to display a Map with markers, annotations, and custom content you provide. You can configure the Map to optionally display the user’s location, track a location, and display various controls to allow them to interact with and control the map’s display. The following example displays a map of downtown San Francisco that shows different markers, and an annotation with custom view content at specific locations:
struct ContentView: View {
var body: some View {
Map {
Marker("San Francisco City Hall", coordinate: cityHallLocation)
.tint(.orange)
Marker("San Francisco Public Library", coordinate: publicLibraryLocation)
.tint(.blue)
Annotation("Diller Civic Center Playground", coordinate: playgroundLocation) {
ZStack {
RoundedRectangle(cornerRadius: 5)
.fill(Color.yellow)
Text("🛝")
.padding(5)
}
}
}
.mapControlVisibility(.hidden)
}
}You create markers, annotations, and overlays using MapContentBuilder with any of several MapContent types including:
You can also add a variety of controls to allow a person to interact with the map to change the map’s scale, display or hide the device’s current location, and so on:
Conforms To
Creating a map
- init(bounds:interactionModes:scope:)) Creates a new, empty map with the bounds, interaction modes, and scope you provide.
- init(bounds:interactionModes:scope:content:)) Creates a new map with the bounds, interaction modes, scope, and content you provide.
- init(bounds:interactionModes:selection:scope:)-11lec) Creates a new, empty map with the bounds, interaction modes, a binding to a map feature, and scope you provide.
- init(bounds:interactionModes:selection:scope:)-236di) Creates a new, empty map with the bounds, interaction modes, the selected map feature, and scope you provide.
- init(bounds:interactionModes:selection:scope:content:)-28wns) Creates a new map with the bounds, interaction modes, selected map feature, scope, and map content you provide.
- init(bounds:interactionModes:selection:scope:content:)-2tdbr) Creates a new map with the bounds, interaction modes, selected value, scope, and map content you provide.
- init(initialPosition:bounds:interactionModes:scope:)) Creates a new, empty map with the initial camera position, bounds, interaction modes, and scope you provide.
- init(initialPosition:bounds:interactionModes:scope:content:)) Creates a new map with the initial camera position, bounds, interaction modes, scope, and map content you provide.
- init(initialPosition:bounds:interactionModes:selection:scope:)) Creates a new, empty map with the initial camera position, bounds, interaction modes, selected map feature, and scope you provide.
- init(initialPosition:bounds:interactionModes:selection:scope:content:)-9feos) Creates a new map with the initial camera position, bounds, interaction modes, selected map feature, scope, and content you provide.
- init(initialPosition:bounds:interactionModes:selection:scope:content:)-451vp) Creates a new map with the initial camera position, bounds, interaction modes, selected map feature, scope, and content you provide.
- init(position:bounds:interactionModes:scope:)) Creates a new, empty map with the initial camera position, bounds, interaction modes, and scope you provide.
- init(position:bounds:interactionModes:scope:content:)) Creates a new map with the initial camera position, bounds, interaction modes, scope, and content you provide.
- init(position:bounds:interactionModes:selection:scope:)) Creates a new map with the initial camera position, bounds, interaction modes, scope, and content you provide.
- init(position:bounds:interactionModes:selection:scope:content:)-47y4p) Creates a new map with the initial camera position, bounds, interaction modes, selected feature, scope, and content you provide.
- init(position:bounds:interactionModes:selection:scope:content:)-9xq1q) Creates a new map with the initial camera position, bounds, interaction modes, selected feature, scope, and content you provide.
- MapInteractionModes Options that indicate the user interactions that the map responds to.
Deprecated
- Deprecated Symbols Map protocols and view modifiers that are no longer supported.
Displaying place information
- mapItemDetailSelectionAccessory(_:)) Specifies the selection accessory to display for the selected map item content.
Initializers
- init(bounds:interactionModes:selection:scope:content:)-335qt)
- init(coordinateRegion:interactionModes:showsUserLocation:userTrackingMode:)) Creates a map that displays a coordinate region and optionally configures available interactions, user location, and tracking behavior.
- init(coordinateRegion:interactionModes:showsUserLocation:userTrackingMode:annotationItems:annotationContent:)) Creates a map that displays a coordinate region with annotations, and optionally configures available interactions, user location, and tracking behavior.
- init(initialPosition:bounds:interactionModes:selection:scope:content:)-2u4ry)
- init(mapRect:interactionModes:showsUserLocation:userTrackingMode:)) Creates a map that displays a map rectangle and optionally configures available interactions, user location, and tracking behavior.
- init(mapRect:interactionModes:showsUserLocation:userTrackingMode:annotationItems:annotationContent:)) Creates a map that displays a map rectangle with annotations, and optionally configures available interactions, user location, and tracking behavior.
- init(position:bounds:interactionModes:selection:scope:content:)-96bhq)
Essentials
- MapStyle A style that you can apply to a map.
---
Extracted from Apple DocC JSON by apple-skills tooling. This is unofficial content. All documentation belongs to Apple Inc.
Navigation: MapKit
Structure
MapCameraPosition
Available on: iOS 17.0+, iPadOS 17.0+, Mac Catalyst, macOS 14.0+, tvOS 17.0+, visionOS, watchOS 10.0+
A structure that describes how to position the map’s camera within the map.
struct MapCameraPositionOverview
MapCameraPosition contains a variety of properties that you can use to control the semantic framings of the camera in relation to its position to the map, such as automatic, which frames the content of the map, and the camera property, which allows you to specify an explicit camera position.
When you pass MapCameraPosition as a binding to a map, the map adjusts its camera to frame the requested content, or to exactly match the camera MapCameraPosition specifies. If a person interacts with the Map in a way that moves the map, the map resets the position to a value that specifies positionedByUser.
Conforms To
Creating a camera position
- camera(_:)) Creates a new camera position from an existing map camera you provide.
- item(_:allowsAutomaticPitch:)) Creates a new camera position centered on a map item and automatic pitch selection you provide.
- rect(_:)) Creates a new camera position with the map boundaries you provide.
- region(_:)) Creates a new camera position the coordinate region you provide.
- userLocation(followsHeading:fallback:)) Creates a camera position with the specific fallback position and optionally follows the user’s heading.
Information about camera position and framing
- automatic The position that frames the map’s content.
- allowsAutomaticPitch The setting that allows the map’s camera to automatically set the pitch when framing the item.
- camera A map camera that defines the camera positioning.
- fallbackPosition The position to use if the framework hasn’t resolved the person’s location.
- item The item the map is framing.
- positionedByUser A Boolean value that indicates whether the person specified the camera position by interacting with the map.
- rect The position that frames the given map rectangle.
- region The coordinate region to frame.
Accessing information about someone’s location
- followsUserHeading A Boolean value that indicates whether the map is following someone’s heading.
- followsUserLocation A Boolean value that indicates whether the map is following someone’s location.
Map customization
- MapCamera Defines a virtual viewpoint above the map surface.
- MapCameraBounds Defines an optional boundary of an area within which the map’s center needs to remain.
- MapCameraUpdateContext A structure that defines additional information about the map camera.
- MapCameraUpdateFrequency A structure that describes when the map camera updates.
---
Extracted from Apple DocC JSON by apple-skills tooling. This is unofficial content. All documentation belongs to Apple Inc.
Navigation: MapKit
Structure
MapFeature
Available on: iOS 17.0+, iPadOS 17.0+, Mac Catalyst, macOS 14.0+, tvOS 17.0+, visionOS, watchOS 10.0+
A tappable map feature.
struct MapFeatureOverview
Tappable map features can include single points of interest, such as hotels and restaurants, a territory, or a physical map feature such as an ocean, basin, river, or mountain range.
Conforms To
Accessing the feature’s properties
- kind The kind of feature represented by the map feature.
- MapFeature.FeatureKind The kind of feature represented by a map feature.
- coordinate The coordinate of the map feature.
- title The title of the map feature.
- backgroundColor The background color associated with the map feature.
- image An image associated with the map feature.
- pointOfInterestCategory The point of interest category of the map feature.
Map features
- MapSelection A value representing a selected feature on a map.
- MapSelectable
---
Extracted from Apple DocC JSON by apple-skills tooling. This is unofficial content. All documentation belongs to Apple Inc.
Navigation: MapKit
API Collection
MapKit for SwiftUI
MapKit for SwiftUI allows you to build map-centric views and apps across Apple platforms. You can design expressive and highly interactive Maps with minimal code by composing views, using ViewBuilders and view modifiers.
Overview
Like MapKit for AppKit and UIKit, MapKit for SwiftUI allows you to take advantage of map styles ranging from satellite imagery to rich, 3D perspective imagery to present vivid maps. Using MapContentBuilder you can configure your maps to show Marker and Annotation views, or — for more specialized content — you can design your own SwiftUI views to place on the map. To add even more interactivity, MapKit for SwiftUI supports overlays to highlight areas on the map, enabling you to animate paths and directions using MapPolyline, or make it easy for people to dig deeper into on the ground details with tappable points of interest. People who use your app can also explore at street level using LookAroundPreview and Look Around viewer.
Note: For more information about integrating MapKit into your app using SwiftUI, see WWDC23 session 10043: Meet MapKit for SwiftUI
Essentials
Annotations and overlays
- Annotation A customizable annotation used to indicate a location on a map.
- MapCircle A circular overlay with a configurable radius that you center on a geographic coordinate.
- MapPolygon A closed polygon overlay.
- MapPolyline An open polygon overlay consisting of one or more connected line segments.
- Marker A balloon-shaped annotation that marks a map location.
- UserAnnotation Displays the person’s current location on the map.
Map controls
- MapCompass A view that reflects the current orientation of the associated map.
- MapLocationCompass A view that displays a combined user location button and map compass.
- MapPitchSlider A slider control that allows a person to change the pitch of the map.
- MapPitchToggle A button that sets the pitch of the associated map.
- MapScaleView Displays a legend with distance information for the associated map.
- MapUserLocationButton A button that sets the framing of the associated map to the user location.
- MapZoomStepper Buttons a person uses to adjust the zoom level of the map.
Exploring at street level
- LookAroundPreview A view that provides a Look Around preview for a specific geographic location.
Map features
- MapFeature A tappable map feature.
- MapSelection A value representing a selected feature on a map.
- MapSelectable
Map customization
- MapCamera Defines a virtual viewpoint above the map surface.
- MapCameraBounds Defines an optional boundary of an area within which the map’s center needs to remain.
- MapCameraPosition A structure that describes how to position the map’s camera within the map.
- MapCameraUpdateContext A structure that defines additional information about the map camera.
- MapCameraUpdateFrequency A structure that describes when the map camera updates.
Place information
- MapItemDetailSelectionAccessoryStyle The map item detail selection accessory style.
- mapItemDetailSelectionAccessory(_:)) Specifies the selection accessory to display for the selected map item content.
- callout(_:)) Presents the accessory as an annotation callout on the map.
Geocoding
- MKGeocodingRequest A class that looks up a geographic coordinate using the provided string.
- MKReverseGeocodingRequest A class that looks up address strings for the provided geographic coordinates.
Representing places and addresses
- MKMapItem A point of interest on the map.
- MKAddress A class that contains a full address, and, optionally, a short address.
- MKAddressRepresentations A class that provides formatted address strings.
- GeoToolbox Determine place descriptor information for map coordinates.
Points of interest
- PointOfInterestCategories A structure you use to define points of interest to include or exclude on a map.
Protocols
- DynamicMapContent A type of view that generates views from an underlying collection of data.
- MapContent A protocol used to construct map content such as controls, markers, and annotations.
- MapContentBuilder A result builder that creates map content from closures you provide.
- MapContentView A view that contains content that displays on a map at a specific position, and that responds to specific interactions you specify.
Structures
- DefaultUserAnnotationContent A structure that represents the view to show at the user’s location on the map.
- EmptyMapContent A map content element that doesn’t contain any content.
- MapProxy A proxy for accessing sizing information about a given map view.
- MapReader A container view that defines its contents as a function of information about the first contained map.
- TupleMapContent A view created from a Swift tuple of map content values.
- MapSelectableContentView
The MapKit APIs
- MapKit for AppKit and UIKit
- Adopting unified Maps URLs Access Maps URLs and options for displaying Maps information across Apple platforms.
---
Extracted from Apple DocC JSON by apple-skills tooling. This is unofficial content. All documentation belongs to Apple Inc.
Navigation: MapKit
Structure
Marker
Available on: iOS 17.0+, iPadOS 17.0+, Mac Catalyst, macOS 14.0+, tvOS 17.0+, visionOS, watchOS 10.0+
A balloon-shaped annotation that marks a map location.
@MainActor @preconcurrency struct Marker<Label> where Label : ViewOverview
Use this view to create marker instances in the closure you provide to the content parameter in the Map initializers.
Conforms To
Creating a marker
- init(_:coordinate:)-82942) Creates a marker at the given location with the label you provide.
- init(_:image:coordinate:)-36l1p) Creates a marker at the given location with the provided title and image resource to display as the balloon’s icon.
- init(_:systemImage:coordinate:)-50yl4) Creates a marker at the given location with the provided title and a system image the map displays as the balloon’s icon.
- init(_:coordinate:)-8wxlv) Creates a marker at the given location with the localized string key you provide.
- init(_:image:coordinate:)-28mge) Creates a marker at the given location with the provided localized title and image resource to display as the balloon’s icon.
- init(_:monogram:coordinate:)-2ojcy) Creates a marker at the given location with the provided title key and monogram.
- init(_:monogram:coordinate:)-21hql) Creates a marker at the given location with the provided title string and monogram.
- init(_:systemImage:coordinate:)-2t4i0) Creates a marker at the given location with a localized title, and a system image the map displays as the balloon’s icon.
- init(coordinate:label:)) Creates a marker at the given location with the provided label.
- init(item:)) Creates a marker for a given map item using a MapKit-provided label.
Displaying place information
- mapItemDetailSelectionAccessory(_:)) Specifies the selection accessory to display for the selected map item content.
Initializers
- init(_:coordinate:)-3bjj6) Creates a marker at the given location.
- init(_:image:coordinate:)-1q3pz) Creates a marker at the given location with an image displayed as the balloon’s icon.
- init(_:monogram:coordinate:)-77k4r) Creates a marker at the given location with a monogram displayed as the balloon’s icon.
- init(_:systemImage:coordinate:)-18xnl) Creates a marker at the given location with a system image displayed as the balloon’s icon.
Annotations and overlays
- Annotation A customizable annotation used to indicate a location on a map.
- MapCircle A circular overlay with a configurable radius that you center on a geographic coordinate.
- MapPolygon A closed polygon overlay.
- MapPolyline An open polygon overlay consisting of one or more connected line segments.
- UserAnnotation Displays the person’s current location on the map.
---
Extracted from Apple DocC JSON by apple-skills tooling. This is unofficial content. All documentation belongs to Apple Inc.