Skip to content
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

Getting wrong annotation count on click of cluster in swift 3 #147

Open
wamobileapps opened this issue Jun 9, 2018 · 1 comment
Open

Comments

@wamobileapps
Copy link

wamobileapps commented Jun 9, 2018

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

@bryanjclark
Copy link

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()
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants