Closed mvorisis closed 7 years ago
I found it out!
Inside didselectannotation
I put these lines of code:
if view.annotation!.isKindOfClass(FBAnnotationCluster)
{
let pinToZoomOn = view.annotation as! FBAnnotationCluster
//this is for getting the number of clustered annotations
print(pinToZoomOn.annotations.count)
//Then depends of how many there are you can zoom differently
let span = MKCoordinateSpanMake(0.010, 0.010)
let region = MKCoordinateRegion(center: pinToZoomOn.coordinate, span: span)
mapView.setRegion(region, animated: true)
}
Hi
I'm trying to zoom in when the user taps on a cluster annotation, and now I did that I want to zoom in differently depends on how many annotations does the cluster annotation that I tapped has clustered.
Thanks in advance