Comments (6)
This bug makes this library virtually unusable. Has there been a fix or at least a workaround for this yet?
from cchmapclustercontroller.
For me, this only happens when I quickly add and remove annotations at the same time to the clustering – which is a use case I don't have.
You can help by
- Creating a unit tests that reproduces this problem
- Provide a solution that avoids this issue
Looking forward to your contributions
from cchmapclustercontroller.
I can reproduce it consistently on the simulator iOS 9.2 (13C75). It seems to be a problem with MKPointAnnotation, which gets added to the set of annotations without detecting duplicates.
Overriding the hash and isEqual as I did in 539c98b seems to be fixing the problem.
from cchmapclustercontroller.
@bhapca Can you please let me know how to reproduce this issue? I'm running the sample app in this repo on Xcode 7.2.1/iPhone 6/iOS 9.2 and tap the reset button. Where does the crash occur for you?
from cchmapclustercontroller.
@choefele, I'm not experiencing any crash, instead I'm getting the duplicate annotations discussed in this issue. The screenshots I included show how the annotations set double in size after 2 consecutive taps on the Reset button. They're screenshots of the debug session, stopped at breakpoint, not crashed, (look at the lldb prompt) which shows the issue.
The steps to repro are the same as described by @grigorye at the beginning of this thread. Essentially launch the sample app, wait for the map to load, tap Reset, see how the number of annotations increase. Repeat tapping Reset, to see the number of annotations keeping growing.
It appears that the allAnnotations property of CCHMapClusterController doesn't behave like a set when it's fed instances of MKPointAnnotation, because it accepts duplicate entries.
It seems that the isEqual method of MKPointAnnotation is messed-up:
from cchmapclustercontroller.
I believe this is fixed in 674ec58
from cchmapclustercontroller.
Related Issues (20)
- Annotation views occasionally disappear while panning/zooming HOT 2
- willReuseMapClusterAnnotation does not work in Swift HOT 6
- showAnnotations:animated: adds the default pin instead of custom Annotation Views HOT 1
- Using own custom MKAnnotation subclass for uniqueLocations HOT 4
- Strange behavior when zooming in and out HOT 14
- Two markers at exact same location HOT 1
- How to get the instance of CCHMapClusterAnnotation? HOT 4
- Crash due to usage of KVO HOT 5
- Annotations and clusters get removed randomly when using MKMapTypeHybridFlyover HOT 7
- Cannot refer to custom subclass of MKAnnotation in viewForAnnotation HOT 3
- Cannot tap on Annotation View
- Can't see annotation while too zoomed out HOT 4
- Annotation coordinate is not properly updated HOT 2
- Displaying different annotation views HOT 1
- Make the representation of ClusterAnnotationView unchanged when zooming in or out HOT 5
- changing the annotation view when isUnique changes HOT 2
- Getting wrong annotation count on click of cluster in swift 3 HOT 1
- TV OS? HOT 1
- Removing Annotations doesn't work correctly HOT 6
- Is it possible for clusters to have sub clusters?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cchmapclustercontroller.