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.
This commit is contained in:
committed by
John Firebaugh
parent
64c05d02e2
commit
f5c1e2630e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user