summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-10-21 12:39:28 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-10-21 12:39:28 -0700
commita4d8b373f3ccc10d08442127c82e816d0312d8f5 (patch)
treeb58137d6d5cdc9e743491cc39ea368a1033cb08e
parenta30add62f95351d0c8ef9e810e7c22927e5436b1 (diff)
downloadqtlocation-mapboxgl-a4d8b373f3ccc10d08442127c82e816d0312d8f5.tar.gz
[ios] Notify delegate during rotate and pitch gestures
-rw-r--r--platform/ios/MGLMapView.mm6
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];
}
}