MKMapView setUserTrackingMode:animated: fails to redraw annotations

Originator:joseph.masilotti
Number:rdar://15554344 Date Originated:11/27/13
Status:Duplicate/15554337 Resolved:
Product:iOS Product Version:iOS 7.0.4
Classification:Serious Issue Reproducible:Always
 
Summary:
When setUserTrackMode:animated: is called with MKUserTrackingModeFollow and YES, and the user's location is far away, then annotations do not render after the map view has animated the visible region to the user's location.

The annotations appear after an unacceptably long delay (Usually more than 10s), or when the user tries to interact with the map.

It also seems that these animations do not trigger  mapView:regionWillChangeAnimated:/regionDidChangeAnimated:.  We're not relying on this, but it does seem a little inconsistent with other methods that animate the visible region of the map.

Steps to Reproduce:
1. Run the attached simple MKMapView based app.
2. Tap the button at the top to start following the user location.
3. Swipe to scroll really, really far away.
4. Tap the button again to start following the user location.
5. Observe that the map view scrolls to the user location but no annotations are visible.

NB: Also seems that the animation that occurs here does not trigger mapView:regionWillChangeAnimated:/regionDidChangeAnimated:.  Could this be related?

Expected Results:
Annotations near the user location (and including the user location) should render immediately when the region comes into view.

Actual Results:
The MKMapView scrolls to the user location, but the user location (and any annotations near the user that should appear on the map) do not appear.  They usually appear after a significant delay (>10 seconds), or when the user touches the map.

If you had difficulty reproducing this bug, then you probably need to scroll further in steps to reproduce #3.

Version:
7.0.4/11B554a

Notes:


Configuration:
- Tested on iPhone Simulator, iOS 7, bug does not occur
- Tested on iPhone 4S running iOS 7.0.4 and is broken there
- Tested on iPhone 5S running iOS 7.0.4 and is broken there


------------------------------------------------------------------------


#import "ViewController.h"
#import <MapKit/MapKit.h>

@interface ViewController ()

@property (weak, nonatomic) IBOutlet MKMapView *mapView;

@end

@implementation ViewController

- (IBAction)justDoIt:(id)sender
{
    [self.mapView setUserTrackingMode:MKUserTrackingModeFollow animated:YES];
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.mapView.delegate = self;
    self.mapView.showsUserLocation = YES;
}

@end

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!