I am working in a map application which renders a polyline over a map. I am having an issue when zooming, it keeps the previous polyline on the tile.
I have tried to force redrawing:
[self.mapView reloadInputViews];
[self.mapView.layer setNeedsDisplay];
[self.mapView setNeedsDisplay];
Also I tried to slow the zoom speed, but the issue is still in there:
[MKMapView animateWithDuration:2
delay:0
usingSpringWithDamping:0.6
initialSpringVelocity:10
options:UIViewAnimationOptionCurveEaseOut
animations:^{
[self.mapView setVisibleMapRect:unionRectThatFits
edgePadding:UIEdgeInsetsMake(20, 10, 20, 10)
animated:YES];
}
completion: nil];
Does anyone know about this?
I found the resolution to the problem here: How to refresh an MKOverlayRenderer when mapView change
So I added:
To my MKPolyline & MKCircle subclass.