You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
It is not necessarily a bug, maybe I'm not using the library right.
When I add annotations to the manager I have a certain number of annotations in there, eg 362
But the if I sum up the numbers in all the cluster annotation view and isolated non-clustered annotations, or simply zoom out to the max, the total number of annotations is different (eg 231). And I get that number both on manager.annotations.count and on annotation.annotations.count:
func mapView(_ mapView:MKMapView, viewFor annotation:MKAnnotation)->MKAnnotationView?{
if let annotation = annotation as?ClusterAnnotation{letidentifier="Cluster"letannotationView= mapView.annotationView(of:HTImageCountClusterAnnotationView.self, annotation: annotation, reuseIdentifier: identifier)
annotationView.countLabel.textColor =UIColor.black
annotationView.image =UIImage(named:"clusterpin")
annotationView.canShowCallout = false
print("Number of annotations in cluster: \(annotation.annotations.count)")print("Number of annotations in manager: \(manager.annotations.count)")return annotationView
}else{...}}
Description
It is not necessarily a bug, maybe I'm not using the library right.
When I add annotations to the manager I have a certain number of annotations in there, eg 362
But the if I sum up the numbers in all the cluster annotation view and isolated non-clustered annotations, or simply zoom out to the max, the total number of annotations is different (eg 231). And I get that number both on manager.annotations.count and on annotation.annotations.count:
This is how I initialize my manager:
I don't understand this discrepancy. I don't remove any annotation from the manager.
Smartphone
Checklist
The text was updated successfully, but these errors were encountered: