How to Stop MapKit Annotation Clustering
The easy way to prevent annotations from disappearing on zoom
I am the creator of Outdoorist, an outdoor adventure tracking app. I decided to share how I built this functionality into my app in case anyone else needs to make sure that all of their annotations are always visible. I was looking for an easy solution to this for a while, but I wanted to avoid hacky methods to get it working. After scouring documentation and testing out many solutions, I finally found a solution I was satisfied with.
I am going to keep everything as straightforward as possible so that this is useful to anyone. Let’s dive into that now:
Getting Started
Let’s start by creating a new single view application Xcode Project. The only major thing to note is that we will be using the Storyboard User Interface instead of SwiftUI.
Open the Main.storyboard file and drag a MapKitView to the center of the screen.
After that, add some constraints to the view by selecting the Add New Constraints button and adding four constraints. Constrain all sides of the view to be…