diff options
author | Jesse Crocker <Jesse@datamongers.net> | 2017-02-16 13:36:21 -0700 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2017-02-16 12:36:21 -0800 |
commit | d4c569a0187d98bca6b71671fa5daf6ee09747da (patch) | |
tree | 03f1a8f9dcaf11b77a2b2461fec73ab86ca87d45 | |
parent | 655b7c035cbeb4fe6f012ea59a715c4cc976e10a (diff) | |
download | qtlocation-mapboxgl-d4c569a0187d98bca6b71671fa5daf6ee09747da.tar.gz |
[ios] Disable region monitoring when stopping location monitoring (#7833)
-rw-r--r-- | platform/ios/CHANGELOG.md | 1 | ||||
-rw-r--r-- | platform/ios/src/MGLLocationManager.m | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index d86a19f642..a0281b3f02 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -46,6 +46,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed an issue where translucent, non-view-backed point annotations along tile boundaries would be drawn darker than expected. ([#6832](https://github.com/mapbox/mapbox-gl-native/pull/6832)) * Fixed flickering that occurred when panning past the antimeridian. ([#7574](https://github.com/mapbox/mapbox-gl-native/pull/7574)) * Added a `MGLDistanceFormatter` class for formatting geographic distances. ([#7888](https://github.com/mapbox/mapbox-gl-native/pull/7888)) +* Fixed an issue that was causing the system location indicator to stay on in background after telemetry was disabled. ([#7833](https://github.com/mapbox/mapbox-gl-native/pull/7833)) ## 3.4.1 - January 25, 2017 diff --git a/platform/ios/src/MGLLocationManager.m b/platform/ios/src/MGLLocationManager.m index d9c3d0e124..b0d2e17d5d 100644 --- a/platform/ios/src/MGLLocationManager.m +++ b/platform/ios/src/MGLLocationManager.m @@ -46,6 +46,13 @@ static NSString * const MGLLocationManagerRegionIdentifier = @"MGLLocationManage [self.delegate locationManagerDidStopLocationUpdates:self]; } } + if(self.standardLocationManager.monitoredRegions.count > 0) { + for(CLRegion *region in self.standardLocationManager.monitoredRegions) { + if([region.identifier isEqualToString:MGLLocationManagerRegionIdentifier]) { + [self.standardLocationManager stopMonitoringForRegion:region]; + } + } + } } #pragma mark - Utilities |