efremidze / Cluster

Easy Map Annotation Clustering 📍
MIT License
1.28k stars 121 forks source link

The count of the annotations in cluster annotation gets messed up #86

Open NSCabezon opened 6 years ago

NSCabezon commented 6 years ago

New Issue Checklist

Issue Description

The clustering count gets messed up, the numbers change from one cluster to another but they sometimes don't get updated...

img_4683 img_4685 img_4620

Environment

NSCabezon commented 6 years ago

It also happens on iOS 12 Release version

enkh-amgalan commented 6 years ago

I have same issues

emiliogambone commented 6 years ago

Same problem, i think they just don't get updated

emiliogambone commented 6 years ago

If I understand your problem, you can substitute the clustering count in the views with the value of annotation.annotations.count. But the problem persist

efremidze commented 6 years ago

Thanks, I'll take a look today.

efremidze commented 6 years ago

Can you provide your configuration?

NSCabezon commented 6 years ago

Here you go:

        clusterManager.cellSize = 50
        clusterManager.maxZoomLevel = 17
        clusterManager.minCountForClustering = 3

        clusterManager.clusterPosition = .nearCenter
efremidze commented 6 years ago

Check out the latest version (2.2.9). Let me know if it fixes the bug.

NSCabezon commented 6 years ago

Still having the issue :(

efremidze commented 6 years ago

I'll try to reproduce. Do you have any reproduction steps?

NSCabezon commented 6 years ago

It reproduces always, the number doesn't show the real annotation count... idk

efremidze commented 6 years ago

I'm trying to reproduce using the example. Do you see it happening in the example? Does it only happen when combining different types of annotations?

NSCabezon commented 6 years ago

Cluster and not clustered... so I guess not... Example is working fine

efremidze commented 6 years ago

It appears to be an issue caused by annotations with images.

efremidze commented 6 years ago

Can you check that the annotation.annotations.count is correct for the ClusterAnnotationView? It might be related to reusing the MKAnnotationView.

efremidze commented 6 years ago

Released 2.3.0. Let me know if you still see the bug.

efremidze commented 5 years ago

After investigating, I found out the annotations are getting transposed when shouldDistributeAnnotationsOnSameCoordinate is set to true. I'm currently looking for a solution.

efremidze commented 5 years ago

I have addressed this issue in #107. Let me know if this is still an issue.

sharedcare commented 4 years ago

I still have this issue, I set minCountForClustering to 5. And the count of annotation does not show the correct number. When I select a clusterAnnotationView on the map, the following code is not executed. if let cluster = view.annotation as? ClusterAnnotation { \\ my code here }