[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.
This commit is contained in:
Fabian Guerra Soto
2019-02-01 11:59:26 -08:00
committed by GitHub
parent b07db0f8d0
commit d7f71a2399
2 changed files with 4 additions and 6 deletions

View File

@@ -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

View File

@@ -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;