Closed nicked closed 11 years ago
Hi, thanks for the feedback, we will have a look at this issue soon!
Thanks.
Also probably related: if you set the map's region while the clustering is happening in the background, there's also a high probability of a crash. Seems that MKMapView fiddles with the annotations when you change the region and this upsets things.
Thanks. Do you have any kind of logs related to this issue?
I fixed the first problem. If you still encounter problems when setting the map's region, please open a new issue, thanks!
Thanks Patrick. I've since put in a few workarounds to avoid crashes, and now after reverting some of them, I can't reproduce that crash :)
If I see any problems in future I'll attach a crash dump.
Cheers, Nick
If you call
setAnnotations:
, the map view recalculates all it's clusters on a background queue.However, if you call
setAnnotations:
again while clusters are still being calculated, there is a high probability of the app crashing. You can test this by calling it rapidly in succession (say, in a loop).A semaphore or some flag should be used to prevent it recalculating clusters while it's already doing so.
Cheers, Nick
ps. Thanks for the code, it's the best clustering component I've found so far!