ashare80 / TSClusterMapView

MKMapView with animated clustering for iOS and OSX
MIT License
149 stars 21 forks source link

Bugfix/1945 added fixes for refresh bug #27

Closed tobyyoungberg closed 9 years ago

ashare80 commented 9 years ago

@tobyyoungberg Hey is there an issue that you fixed that should be merged or was there a mistake?

tobyyoungberg commented 9 years ago

Sorry, I intended to file a pull request on my own fork, but mistakenly opened it for the project. I'm not sure my changes will benefit the community greatly, but I do want to mention an issue I ran across that I addressed with these changes. It seems that removing all annotations and then adding them back (refreshing annotations) causes some threading issues and results in problems with missing pins in the final clustered result. To address the issue I added a removeAllAnnotations function that blocks until done rather than using the operation mechanism. Since clustering isn't needed for an empty data set, this seemed to resolve the issue for us. I still don't feel that its the correct way to fix the issue, but would have required additional time for debugging that I didn't have.