Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios] Restart user location heading updates on validation
Browse files Browse the repository at this point in the history
Fixes #4668. Thanks to @JThramer for reporting.
  • Loading branch information
friedbunny committed Apr 12, 2016
1 parent c3bed1d commit eda132d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Mapbox welcomes participation and contributions from everyone. If you’d like

## master

- User location heading updates now resume properly when an app becomes active again. ([#4674](https://github.com/mapbox/mapbox-gl-native/pull/4674))

## 3.2.0

- If you’ve previously installed the SDK as a static framework, the installation workflow has changed to address issues when submitting your application to the App Store or installing it on a device. Upon upgrading to this version of the SDK, you’ll need to add Mapbox.bundle to the Copy Bundle Resources build phase and remove Mapbox.framework from the Embed Frameworks build phase. ([#4455](https://github.com/mapbox/mapbox-gl-native/pull/4455))
Expand Down
5 changes: 5 additions & 0 deletions platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3047,6 +3047,11 @@ - (void)validateLocationServices
self.locationManager.headingFilter = 5.0;
self.locationManager.delegate = self;
[self.locationManager startUpdatingLocation];

if (self.userTrackingMode == MGLUserTrackingModeFollowWithHeading)
{
[self.locationManager startUpdatingHeading];
}
}
else if ( ! shouldEnableLocationServices && self.locationManager)
{
Expand Down

0 comments on commit eda132d

Please sign in to comment.