I use MKPolylineview to show a route on a map.
I have two buttons, one to display the route, one to hide the route.
On an iPhone with ios 4.0.2 the route hides and displays perfectly fine when I click the buttons.
On an iPhone with ios 4.1 installed the route displays fine. When I click the button to hide the route the line expands in size x2(roughly) and becomes blurred.
If I play with the zoom level it then eventually disappears. At times when I zoom back in it reappears momentarily as I pass through a certain zoom level. (I know there are technically no zoom levels in MapKit but I hope you get my meaning).
The line blurring effect happens in the simulator also with 4.1. It does not appear on a previous version of my app in Store that was built with the previous SDK release.
The snippet of code that hides the route when the button is clicked is below.
-(IBAction) segmentedControlIndexChanged{
switch (self.control.selectedSegmentIndex) {
case 0:{
NSArray *allValues = [routeLineViews allValues];
for(MKOverlayView *lineView in allValues){
lineView.hidden = YES;
}
[map setNeedsLayout];
break;
}
}