diff options
Diffstat (limited to 'platform/ios/src/MGLLocationManager.m')
-rw-r--r-- | platform/ios/src/MGLLocationManager.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/ios/src/MGLLocationManager.m b/platform/ios/src/MGLLocationManager.m index 7a9faf5c8d..d9c3d0e124 100644 --- a/platform/ios/src/MGLLocationManager.m +++ b/platform/ios/src/MGLLocationManager.m @@ -32,7 +32,7 @@ static NSString * const MGLLocationManagerRegionIdentifier = @"MGLLocationManage if ([self isUpdatingLocation]) { return; } - + [self configurePassiveStandardLocationManager]; [self startLocationServices]; } @@ -78,7 +78,7 @@ static NSString * const MGLLocationManagerRegionIdentifier = @"MGLLocationManage self.standardLocationManager.allowsBackgroundLocationUpdates = YES; } } - + [self.standardLocationManager startUpdatingLocation]; self.updatingLocation = YES; if ([self.delegate respondsToSelector:@selector(locationManagerDidStartLocationUpdates:)]) { @@ -91,13 +91,13 @@ static NSString * const MGLLocationManagerRegionIdentifier = @"MGLLocationManage if (self.backgroundLocationServiceTimeoutAllowedDate == nil) { return; } - + if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive || [UIApplication sharedApplication].applicationState == UIApplicationStateInactive ) { [self startBackgroundTimeoutTimer]; return; } - + NSTimeInterval timeIntervalSinceTimeoutAllowed = [[NSDate date] timeIntervalSinceDate:self.backgroundLocationServiceTimeoutAllowedDate]; if (timeIntervalSinceTimeoutAllowed > 0) { [self.standardLocationManager stopUpdatingLocation]; |