@@ -15,7 +15,7 @@ public class MapViewCoordinator: NSObject {
1515 // Indicates whether we are currently in a push-down camera update cycle.
1616 // This is necessary in order to ensure we don't keep trying to reset a state value which we were already processing
1717 // an update for.
18- private var isUpdatingCamera = false
18+ var suppressCameraUpdatePropagation = false
1919
2020 var onStyleLoaded : ( ( MLNStyle ) -> Void ) ?
2121 var onGesture : ( MLNMapView , UIGestureRecognizer ) -> Void
@@ -53,7 +53,7 @@ public class MapViewCoordinator: NSObject {
5353 return
5454 }
5555
56- isUpdatingCamera = true
56+ suppressCameraUpdatePropagation = true
5757 switch camera. state {
5858 case let . centered( onCoordinate: coordinate, zoom: zoom, pitch: pitch, direction: direction) :
5959 mapView. userTrackingMode = . none
@@ -92,7 +92,7 @@ public class MapViewCoordinator: NSObject {
9292 }
9393
9494 snapshotCamera = camera
95- isUpdatingCamera = false
95+ suppressCameraUpdatePropagation = false
9696 }
9797
9898 // MARK: - Coordinator API - Styles + Layers
@@ -238,12 +238,12 @@ extension MapViewCoordinator: MLNMapViewDelegate {
238238 direction: mapView. direction,
239239 reason: CameraChangeReason ( reason) )
240240 snapshotCamera = newCamera
241- self . parent. camera = newCamera
241+ parent. camera = newCamera
242242 }
243243
244244 /// The MapView's region has changed with a specific reason.
245245 public func mapView( _ mapView: MLNMapView , regionDidChangeWith reason: MLNCameraChangeReason , animated _: Bool ) {
246- guard !isUpdatingCamera else {
246+ guard !suppressCameraUpdatePropagation else {
247247 return
248248 }
249249
0 commit comments