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

Fixed incorrect notification #2373

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion platform/ios/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ - (void)handlePanGesture:(UIPanGestureRecognizer *)pan

self.centerPoint = CGPointMake(self.centerPoint.x + delta.x, self.centerPoint.y + delta.y);

[self notifyMapChange:mbgl::MapChangeRegionDidChangeAnimated];
[self notifyMapChange:mbgl::MapChangeRegionIsChanging];
}
else if (pan.state == UIGestureRecognizerStateEnded || pan.state == UIGestureRecognizerStateCancelled)
{
Expand Down Expand Up @@ -960,6 +960,8 @@ - (void)handlePinchGesture:(UIPinchGestureRecognizer *)pinch
if (log2(newScale) < _mbglMap->getMinZoom()) return;

_mbglMap->setScale(newScale, [pinch locationInView:pinch.view].x, [pinch locationInView:pinch.view].y);

[self notifyMapChange:mbgl::MapChangeRegionIsChanging];
}
else if (pinch.state == UIGestureRecognizerStateEnded || pinch.state == UIGestureRecognizerStateCancelled)
{
Expand Down Expand Up @@ -1333,6 +1335,8 @@ - (void)handleQuickZoomGesture:(UILongPressGestureRecognizer *)quickZoom
if (newZoom < _mbglMap->getMinZoom()) return;

_mbglMap->scaleBy(powf(2, newZoom) / _mbglMap->getScale(), self.bounds.size.width / 2, self.bounds.size.height / 2);

[self notifyMapChange:mbgl::MapChangeRegionIsChanging];
}
else if (quickZoom.state == UIGestureRecognizerStateEnded || quickZoom.state == UIGestureRecognizerStateCancelled)
{
Expand Down