From f5c1e2630e553a727a91f0de623bf3ec1bdcc559 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Wed, 20 May 2015 12:14:50 -0700 Subject: Remove redundant didChangeAuthorizationStatus: in favor of didFailWithError: Listening to both `locationManager:didChangeAuthorizationStatus:` and `locationManager:didFailWithError:` delegate methods is unnecessary. Setting `showsUserLocation = NO` in the first means that the second never gets called and our `mapView:didFailToLocateUserWithError:` delegate method never gets called. --- platform/ios/MGLMapView.mm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index cf2274e2b0..4c014d12cf 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -2254,15 +2254,6 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng) } } -- (void)locationManager:(__unused CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status -{ - if (status == kCLAuthorizationStatusDenied || status == kCLAuthorizationStatusRestricted) - { - self.userTrackingMode = MGLUserTrackingModeNone; - self.showsUserLocation = NO; - } -} - - (void)locationManager:(__unused CLLocationManager *)manager didFailWithError:(NSError *)error { if ([error code] == kCLErrorDenied) -- cgit v1.2.1