diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-10-21 12:39:28 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-10-21 12:39:28 -0700 |
commit | a4d8b373f3ccc10d08442127c82e816d0312d8f5 (patch) | |
tree | b58137d6d5cdc9e743491cc39ea368a1033cb08e /platform | |
parent | a30add62f95351d0c8ef9e810e7c22927e5436b1 (diff) | |
download | qtlocation-mapboxgl-a4d8b373f3ccc10d08442127c82e816d0312d8f5.tar.gz |
[ios] Notify delegate during rotate and pitch gestures
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapView.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index d68bc993b2..ae9411dfc1 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -1071,6 +1071,8 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) _mbglMap->setBearing(newDegrees, [rotate locationInView:rotate.view].x, [rotate locationInView:rotate.view].y); + + [self notifyMapChange:mbgl::MapChangeRegionIsChanging]; } else if (rotate.state == UIGestureRecognizerStateEnded || rotate.state == UIGestureRecognizerStateCancelled) { @@ -1414,12 +1416,14 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) CGFloat pitchNew = mbgl::util::clamp(currentPitch - (gestureDistance / slowdown), MGLMinimumPitch, MGLMaximumPitch); _mbglMap->setPitch(pitchNew); + + [self notifyMapChange:mbgl::MapChangeRegionIsChanging]; } else if (twoFingerDrag.state == UIGestureRecognizerStateEnded || twoFingerDrag.state == UIGestureRecognizerStateCancelled) { [self unrotateIfNeededAnimated:YES]; - //[self notifyMapChange:(mbgl::MapChangeRegionDidChange)]; + [self notifyMapChange:mbgl::MapChangeRegionDidChange]; } } |