summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2019-02-01 11:59:26 -0800
committerGitHub <noreply@github.com>2019-02-01 11:59:26 -0800
commitd7f71a2399fb9d988ded1e3cdf0e1fd80be83d54 (patch)
tree95a398d957951b98b2d00e0ff4a6c6b594a6351c
parentb07db0f8d01f855dcd336aa1baabde94c5c1740d (diff)
downloadqtlocation-mapboxgl-d7f71a2399fb9d988ded1e3cdf0e1fd80be83d54.tar.gz
[ios] Fix the user location not getting displayed when setting tracking mode to followWithCourse and followWithHeading (#13849)
Removed legacy code that was causing the mapView to ignore setting the user location to tracking modes follingWithCourse and followWithHeading.
-rw-r--r--platform/ios/CHANGELOG.md4
-rw-r--r--platform/ios/src/MGLMapView.mm6
2 files changed, 4 insertions, 6 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 7974598ce8..61ecc4f5e7 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -2,6 +2,10 @@
Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started.
+## master
+
+* Fixed a bug where setting `MGLMapView.userTrackingMode` to `MGLUserTrackingModeFollowWithHeading` and `MGLUserTrackingModeFollowWithCourse` was being ignored. ([#13849](https://github.com/mapbox/mapbox-gl-native/pull/13849))
+
## 4.8.0
### Styles and rendering
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 309584e73a..9620a9514c 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -5163,12 +5163,6 @@ public:
MGLLogDebug(@"Setting userTrackingMode: %lu animated: %@", mode, MGLStringFromBOOL(animated));
if (mode == _userTrackingMode) return;
- if ((mode == MGLUserTrackingModeFollowWithHeading || mode == MGLUserTrackingModeFollowWithCourse) &&
- ! CLLocationCoordinate2DIsValid(self.userLocation.coordinate))
- {
- mode = MGLUserTrackingModeNone;
- }
-
MGLUserTrackingMode oldMode = _userTrackingMode;
[self willChangeValueForKey:@"userTrackingMode"];
_userTrackingMode = mode;