Authored by Justin R. Miller

minor improvements to location update handling

@@ -2728,7 +2728,7 @@ @@ -2728,7 +2728,7 @@
2728 2728
2729 - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation 2729 - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
2730 { 2730 {
2731 - if ( ! showsUserLocation || _mapScrollView.isDragging || ! CLLocationCoordinate2DIsValid(newLocation.coordinate)) 2731 + if ( ! showsUserLocation || _mapScrollView.isDragging || ! newLocation || ! CLLocationCoordinate2DIsValid(newLocation.coordinate))
2732 return; 2732 return;
2733 2733
2734 if ([newLocation distanceFromLocation:oldLocation]) 2734 if ([newLocation distanceFromLocation:oldLocation])
@@ -2875,8 +2875,6 @@ @@ -2875,8 +2875,6 @@
2875 2875
2876 if ( ! [_annotations containsObject:userLocation]) 2876 if ( ! [_annotations containsObject:userLocation])
2877 [self addAnnotation:userLocation]; 2877 [self addAnnotation:userLocation];
2878 -  
2879 - [self correctPositionOfAllAnnotations];  
2880 } 2878 }
2881 2879
2882 - (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager 2880 - (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager