views:

36

answers:

1

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;
   }
}
A: 

If it worked as documented in iOS 4.0.2 and then doesn't work in iOS 4.1 without any code changes, I would expect that to be an SDK bug and you should raise a bug report with Apple.

If you can, I would suggest trying to reproduce the defect in a sample project, isolating it from any of your other code. This project can be attached with the bug report and will help Apple in deciding what to do with it.

You can report a bug at http://bugreporter.apple.com

Jasarien