Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions REMarkerClusterer/REMarkerClusterer.m
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,12 @@ - (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
{
[self clusterize:YES];
[self.mapView deselectAnnotation:[self.mapView.selectedAnnotations objectAtIndex:0] animated:NO];

if ([_delegate respondsToSelector:@selector(mapView:regionDidChangeAnimated:)])
if ([self.selectedAnnotations count]>0) {
[self.mapView deselectAnnotation:[self.mapView.selectedAnnotations objectAtIndex:0] animated:NO];
if ([_delegate respondsToSelector:@selector(mapView:regionDidChangeAnimated:)])
[_delegate mapView:mapView regionDidChangeAnimated:animated];

}
}

- (void)mapViewWillStartLoadingMap:(MKMapView *)mapView
Expand Down