[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:
committed by
GitHub
parent
b07db0f8d0
commit
d7f71a2399
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user