ribl / FBAnnotationClusteringSwift

Swift translation of FB Annotation Clustering, which clusters pins on the map for iOS.
http://ribl.co/blog/2015/05/28/map-clustering-with-swift-how-we-implemented-it-into-the-ribl-ios-app/
MIT License
311 stars 109 forks source link

How to hide cluster count when we do full zoom out. #67

Open vikash1307 opened 7 years ago

vikash1307 commented 7 years ago

Hi,

I am using this framework and i loved it. I want to hide the cluster count when did full zoom out. Actually when more than one device in same position , i want to hide cluster count in full zoom out . Is this any way to do that.

0xfima commented 7 years ago

Hi, you can edit the FBClusteringManager.swift, and add action for full zoom here: switch count { case 0: break case 1: clusteredAnnotations += annotations default: let coordinate = CLLocationCoordinate2D( latitude: CLLocationDegrees(totalLatitude)/CLLocationDegrees(count), longitude: CLLocationDegrees(totalLongitude)/CLLocationDegrees(count) ) let cluster = FBAnnotationCluster() cluster.coordinate = coordinate cluster.annotations = annotations clusteredAnnotations.append(cluster) }