-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
count on cluster item #11
Comments
You can manage the cluster UI in the mapview's data source method.
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
if let cluster = annotation as? CKCluster {
// Return an annotation view that show the cluster count.
}
}
func mapView(_ mapView: GMSMapView, markerFor cluster: CKCluster) -> GMSMarker {
let marker = GMSMarker(position: cluster.coordinate)
marker.iconView = // Set a view that show the cluster count.
return marker;
} |
@maxep I created simple |
@MaeseppTarvo yes you can use the |
@MaeseppTarvo I tried adding a label as a subview to the annotationView of the example project and I was experiencing the same issue: the label was off by a lot (and it persisted even when the annotation wasn't a cluster). If you disable the annotation reuse it works though. |
Did you properly clean the count label of the reused view? whether in the |
Hey! How should you add the count to cluster item?
The text was updated successfully, but these errors were encountered: