diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 040c05803..b8cfbdb92 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -237,6 +237,7 @@ class MBXMapView if (pinch.state == UIGestureRecognizerStateBegan) { mapView->map.startScaling(); + self.scale = mapView->map.getScale(); } else if (pinch.state == UIGestureRecognizerStateChanged) @@ -260,6 +261,7 @@ class MBXMapView else if (pinch.state == UIGestureRecognizerStateEnded) { mapView->map.stopScaling(); + if (fabsf(pinch.velocity) < 20) return; @@ -272,7 +274,8 @@ class MBXMapView mapView->map.scaleBy(new_scale / scale, [pinch locationInView:pinch.view].x, [pinch locationInView:pinch.view].y, duration); } - else if (pinch.state == UIGestureRecognizerStateCancelled) { + else if (pinch.state == UIGestureRecognizerStateCancelled) + { mapView->map.stopScaling(); } @@ -286,6 +289,7 @@ class MBXMapView if (rotate.state == UIGestureRecognizerStateBegan) { mapView->map.startRotating(); + self.angle = mapView->map.getAngle(); } else if (rotate.state == UIGestureRecognizerStateChanged)