// the find
efremidze/Cluster
Easy Map Annotation Clustering 📍
A QuadTree-based clustering library for MKMapView that groups nearby annotations into cluster pins as you zoom out. It's for iOS devs building map-heavy UIKit apps who need annotation clustering without writing the spatial-partitioning logic themselves.
Uses an actual QuadTree for spatial lookups instead of brute-force distance checks between every annotation pair, so it holds up with large annotation counts. The codebase is tiny (six source files) which makes it easy to read end to end or vendor directly if you don't want a dependency. Styling is flexible — you get color/radius or image-based cluster views out of the box, plus full custom MKAnnotationView subclassing if you need something specific. Ships three install paths (SPM, CocoaPods, Carthage) and a working example project you can actually run.
MKMapView has had native annotation clustering since iOS 11 via clusteringIdentifier and MKClusterAnnotation — this library predates that and now mostly duplicates what Apple ships for free, so you're taking on a dependency to avoid a delegate method you'd have to implement anyway. Everything is wired through MKMapViewDelegate and manual reload() calls on regionDidChangeAnimated, which means no SwiftUI story; wrapping this for a SwiftUI Map means hand-rolling a UIViewRepresentable bridge. The presence of an Atomic.swift wrapper suggests thread-safety was retrofitted rather than designed in, and the README doesn't document what's actually safe to call off the main thread. It's also a single-maintainer project with a fairly quiet commit history outside dependency bumps, so don't expect fast turnaround on edge-case bugs.