CCHMapClusterController icon indicating copy to clipboard operation
CCHMapClusterController copied to clipboard

Getting wrong annotation count on click of cluster in swift 3

Open wamobileapps opened this issue 7 years ago • 1 comments

When I click on a particular cluster then not getting a exact annotation count that I showed over label In swift 3.I am showing this label over image in swift 3. Can anybody help me

wamobileapps avatar Jun 09 '18 05:06 wamobileapps

Hey! It's hard to tell exactly what you're seeing based on this brief bug report, but: I was seeing a similar issue for a bit in my code, and found a fix for my issue. I needed to implement mapClusterController(_:willReuse:) — and in my implementation, I need to re-set the counter label I had on my little badge view.

Hope that helps!

    public func mapClusterController(_ mapClusterController: CCHMapClusterController!, willReuse mapClusterAnnotation: CCHMapClusterAnnotation!) {
        let annotationView = mapView.view(for: mapClusterAnnotation) as! PhotoClusterAnnotationView
        self.update(annotationView: annotationView, withAnnotation: mapClusterAnnotation)
        annotationView.prepareForReuse()
    }

bryanjclark avatar Aug 27 '18 00:08 bryanjclark