efremidze / Cluster

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

Use isEqual to compare annotations instead #65

Closed james-gs closed 6 years ago

james-gs commented 6 years ago

The previous equality (===) check is not sufficient for ClusterAnnotation, as ClusterManager may generate a new ClusterAnnotation with the same coordinate and annotations that is currently on the map.

This PR will prevent unnecessary removing/adding of the same ClusterAnnotations that could cause flickering on the map.

antontingstrom commented 6 years ago

I want to vouch and give a huge 👍 for this fix! I have tested it in a project and it works well as far as I can see, it heavily reduces the amount of flickering that's present in the latest release.

efremidze commented 6 years ago

Thanks @james-gs!!!!