skip to Main Content

How can i get these pins detailed as shown in the pictures? For example i have an app showing listings for a particular purpose. Each listing holds a location as name(not longitude and latitude as of now) . I want to show a map showing the number of listings in a particular&larger area, then when the user zooms in I want to show listings in specific locations one by one. How to achieve this roughly?

Larger Area
Specific Locations

2

Answers


  1. I think there is more than one way to do this. Your first priority is to control the zoom, after the zoom level, the number and shapes of the annotations will change.

    • region.span.latitudeDelta
    • region.span.longitudeDelta

    you can calculate the widths of the areas according to these zoom levels and continue your operations accordingly.

    Login or Signup to reply.
  2. SwiftUI Map does not support clustering, as of iOS 18 beta (and iOS 17). You’ll have to fall back to MKMapView and wrap that for SwiftUI. Clustering in MKMapView works nicely.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search