MapKit Reference
API reference for MapKit: the SwiftUI Map (iOS 17+) and UIKit's MKMapView, annotations, overlays, search, directions, Look Around, snapshots, and geocoding.
When to Use This Reference
Use this reference when:
- Looking up the SwiftUI
Mapcontent builder API - Configuring
MapCameraPositionfor programmatic camera control - Implementing
MKLocalSearchorMKLocalSearchCompleter - Setting up
MKDirectionsfor routing - Working with Look Around scenes
- Converting between addresses and coordinates with the iOS 26 geocoding APIs
- Checking iOS version requirements for MapKit features
Example Prompts
Questions you can ask your assistant that will draw from this reference:
- "What's the SwiftUI
MapAPI for annotations?" - "How do I use
MapCameraPosition?" - "What's the
MKLocalSearchCompleterAPI for autocomplete?" - "How do I calculate directions between two points?"
- "What iOS version added the SwiftUI
Mapcontent builder?" - "How do I create a map snapshot image?"
- "How do I turn an address into coordinates with
MKGeocodingRequest?"
What's Covered
- SwiftUI vs.
MKMapViewfeature comparison - SwiftUI
MapAPI: content builder,MapCameraPosition, selection, camera change callbacks, styles, interaction modes - Map content:
Marker,Annotation,UserAnnotation, shape overlays, clustering MKMapViewin SwiftUI and keyMKMapViewDelegatemethods- Annotation views:
MKMarkerAnnotationView,MKAnnotationView, custom callouts, reuse MKLocalSearchandMKLocalSearchCompleter, result types, rate limiting, and the 11 point-of-interest categories new in the 27 releasesMKDirectionsandMKRoute: transport types, ETA-only requests, turn-by-turn steps- Look Around:
MKLookAroundScene,LookAroundPreview, static snapshots - Overlays and renderers, overlay levels, gradient polylines
- Map snapshots with
MKMapSnapshotter - iOS version feature matrix
- GeoToolbox and
PlaceDescriptor(iOS 26+) MKGeocodingRequest,MKReverseGeocodingRequest, andMKAddress(iOS 26+)- Choosing between geocoding and
MKLocalSearch
Documentation Scope
This page documents the mapkit-ref skill (in the axiom-location suite), the API reference your assistant uses for MapKit syntax and configuration.
Related
- MapKit – Decision trees and anti-patterns for building map features
- MapKit Diagnostics – Troubleshooting annotations, region jumping, and search failures
- Core Location Reference – The location APIs that feed a map
Resources
WWDC: 2023-10043, 2024-10094
Docs: /mapkit, /mapkit/map, /mapkit/mklocalsearch, /mapkit/mkdirections, /geotoolbox, /geotoolbox/placedescriptor, /mapkit/mkgeocodingrequest, /mapkit/mkreversegeocodingrequest, /mapkit/mkaddress