-
Notifications
You must be signed in to change notification settings - Fork 57
Description
When I turn on the user location
[m_MapView setShowsUserLocation:true];
Then I pinch to zoom in or out, the user location reanimates it's self as if It was just turned on for the first time. Rather annoying.
So, If I modify REVClusterMap so the MKUserLocaiton is not removed from the annotation collection as such...
- (void) mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
{
if( [self mapViewDidZoom] )
{
//[super removeAnnotations:self.annotations];
//self.showsUserLocation = self.showsUserLocation;
//Make sure we remove all the annotations first, except the user location
for (int i =0; i < [self.annotations count]; i++)
{
if (![[self.annotations objectAtIndex:i] isKindOfClass:[MKUserLocation class]])
{
[self removeAnnotation:[self.annotations objectAtIndex:i]];
}
}
}
//...rest of the code...
}
Then the user location does not reanimate it's self. Great!! However, the clustering has strange artifacts.
Sometimes I see clusters on top of other clusters. And the number of pins and clusters do not always add up. If I undo my changes then the strange artifacts go away.
Is there another way NOT to reanimate the user location each time the zoom is changed?
Or, if you try the code above, did you happen to solve the strange artifacts that show up?
Thanks,
Brian.