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

Commit

Permalink
[ios] No manual rotating in heading/course tracking mode
Browse files Browse the repository at this point in the history
Manually rotating the map in heading or course tracking mode now kicks the user back into location tracking mode.
  • Loading branch information
1ec5 committed Jan 22, 2016
1 parent c062494 commit 556690f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,11 @@ - (void)handleRotateGesture:(UIRotationGestureRecognizer *)rotate
[self trackGestureEvent:MGLEventGestureRotateStart forRecognizer:rotate];

self.angle = MGLRadiansFromDegrees(_mbglMap->getBearing()) * -1;

if (self.userTrackingMode != MGLUserTrackingModeNone)
{
self.userTrackingMode = MGLUserTrackingModeFollow;
}

[self notifyGestureDidBegin];
}
Expand Down

0 comments on commit 556690f

Please sign in to comment.