applidium / ADClusterMapView

MKMapView with clustering
http://applidium.github.io/ADClusterMapView/
Other
658 stars 129 forks source link

Crash when zooming to kADCoordinate2DOffscreen #44

Closed vrujbr closed 8 years ago

vrujbr commented 10 years ago

When you zoom out you get to show a few annotations on kADCoordinate2DOffscreen (almost north pole) from both pools and call viewForAnnoattion. If you happen to have in this method [clusterAnnotation originalAnnotations] code, it crashes, cause it executes NSAssert(self.cluster != nil, @"This annotation should have a cluster assigned!");. Obviously, there`s no cluster and nothing cause this is not a real annotation, just a prototype from some pool. Fix: Setting #define kADCoordinate2DOffscreen kCLLocationCoordinate2DInvalid in ADClusterAnnotation fixes that, not sure if it doesn't cause problems elsewhere (as discussed in another issue). Workaround: check if annotation is not on kADCoordinate2DOffscreen before calling originalAnnotations.

samuel-gallet commented 8 years ago

Fix with the version update to 1.2