diff options
author | Jason Wray <jason@kulturny.com> | 2015-08-10 15:50:25 -0400 |
---|---|---|
committer | Jason Wray <jason@kulturny.com> | 2015-10-05 12:15:54 -0400 |
commit | a5e34a2bc829d35bb946c2a53d3b1459cc9e05e0 (patch) | |
tree | 9e96da81e5ee7b72d26d8001b711810db64678f9 /platform/ios/MGLMapView.mm | |
parent | b406c942df3293f12415d24d03ef17eb44847c88 (diff) | |
download | qtlocation-mapboxgl-a5e34a2bc829d35bb946c2a53d3b1459cc9e05e0.tar.gz |
[ios] Don't disable user tracking on `setDirection:` or quick zoom gesture
Diffstat (limited to 'platform/ios/MGLMapView.mm')
-rw-r--r-- | platform/ios/MGLMapView.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 3b86c7b987..64f8d0f69d 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -1371,8 +1371,6 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) self.scale = _mbglMap->getScale(); self.quickZoomStart = [quickZoom locationInView:quickZoom.view].y; - - self.userTrackingMode = MGLUserTrackingModeNone; } else if (quickZoom.state == UIGestureRecognizerStateChanged) { @@ -1772,7 +1770,10 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord { if ( ! animated && ! self.rotationAllowed) return; - self.userTrackingMode = MGLUserTrackingModeNone; + if (self.userTrackingMode == MGLUserTrackingModeFollowWithHeading) + { + self.userTrackingMode = MGLUserTrackingModeFollow; + } CGFloat duration = (animated ? MGLAnimationDuration : 0); |