mapkit

Implement MapKit and CoreLocation workflows with SwiftUI maps and async APIs.

Updated May 10, 2026
One-click install
npx skills add https://github.com/FelixRauch/medat-figuren --skill mapkit-felixrauch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mapkit
Source: https://github.com/FelixRauch/medat-figuren/tree/main/.agents/skills/mapkit
Command: npx skills add https://github.com/FelixRauch/medat-figuren --skill mapkit-felixrauch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

MapKit and CoreLocation development can be slow and error-prone when you need to add maps, track user location, search places, or render routes with modern SwiftUI and async APIs.

Core Features & Use Cases

  • SwiftUI Map construction (iOS 17+): Add markers/annotations and draw overlays like polylines, polygons, and circles inside a MapContentBuilder.
  • Modern CoreLocation streaming: Use CLLocationUpdate live updates to track location with concurrency-friendly patterns and proper cancellation.
  • Search and routing: Implement place autocomplete and directions, then display routes as map polylines.
  • Practical guardrails: Handle authorization UX, debounce search, manage CLMonitor geofencing limits, and review battery/performance pitfalls.

Quick Start

Use the mapkit skill to implement a SwiftUI Map with markers, user location tracking, debounced place search, and a drawn directions route for a selected destination.

Frequently Asked Questions about mapkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track user location in SwiftUI using CLLocationUpdate live updates?

Track user location in SwiftUI by consuming CLLocationUpdate live updates via async streams, ensuring concurrency-friendly patterns and proper cancellation. This modern CoreLocation approach provides low-latency location streaming while avoiding battery drain and performance pitfalls.

How do I implement place autocomplete and routing with MapKit in SwiftUI?

Implement place autocomplete by debouncing MKLocalSearchCompleter queries, then calculate directions to the selected destination. Display the resulting routing route as map polylines inside a MapContentBuilder using the modern SwiftUI Map construction APIs on iOS 17+.

Can I use MapContentBuilder to add markers, overlays, and geofencing to a SwiftUI Map?

Yes, MapContentBuilder supports adding markers, annotations, and drawing overlays like polylines, polygons, and circles. For geofencing, integrate CLMonitor events to monitor geographic boundaries, managing its specific limits to ensure reliable behavior.

What authorization and Info.plist configuration do I need for CoreLocation and MapKit?

You must configure guarded authorization UX and Info.plist location permissions for CoreLocation and MapKit to function reliably. Proper setup ensures low-latency location updates, accurate geocoding, and seamless streaming without runtime crashes or silent failures.

Why is my MapKit geofencing or local search latency high and draining battery?

High latency and battery drain in MapKit geofencing and local search often stem from unmanaged CLMonitor limits and un-debounced MKLocalSearchCompleter queries. Apply debounced search requests and manage CLMonitor events to restore reliable, low-latency performance.