diff --git a/iphone/Maps/UI/AvailableArea/VisibleArea.swift b/iphone/Maps/UI/AvailableArea/VisibleArea.swift index 7c24c482bb..4e3b1e00a2 100644 --- a/iphone/Maps/UI/AvailableArea/VisibleArea.swift +++ b/iphone/Maps/UI/AvailableArea/VisibleArea.swift @@ -15,7 +15,7 @@ final class VisibleArea: AvailableArea { return } } - FrameworkHelper.setVisibleViewport(areaFrame, scaleFactor: contentScaleFactor) + FrameworkHelper.setVisibleViewport(areaFrame, scaleFactor: MapViewController.shared()?.mapView.contentScaleFactor ?? 1) } } diff --git a/iphone/Maps/UI/CarPlay/CarPlayMapViewController.swift b/iphone/Maps/UI/CarPlay/CarPlayMapViewController.swift index 00c1cabdef..2a9355be71 100644 --- a/iphone/Maps/UI/CarPlay/CarPlayMapViewController.swift +++ b/iphone/Maps/UI/CarPlay/CarPlayMapViewController.swift @@ -123,7 +123,7 @@ final class CarPlayMapViewController: MWMViewController { frame.origin = origin frame.size = CGSize(width: viewBounds.width - origin.x, height: viewBounds.height - origin.y) - FrameworkHelper.setVisibleViewport(frame, scaleFactor: view.contentScaleFactor) + FrameworkHelper.setVisibleViewport(frame, scaleFactor: mapView?.contentScaleFactor ?? 1) } private func updateVisibleViewPortToNavigationState() { @@ -136,11 +136,11 @@ final class CarPlayMapViewController: MWMViewController { frame.origin = origin frame.size = CGSize(width: viewBounds.width - (origin.x + mapControlsWidth), height: viewBounds.height - origin.y) - FrameworkHelper.setVisibleViewport(frame, scaleFactor: view.contentScaleFactor) + FrameworkHelper.setVisibleViewport(frame, scaleFactor: mapView?.contentScaleFactor ?? 1) } private func updateVisibleViewPortToDefaultState() { - FrameworkHelper.setVisibleViewport(view.bounds, scaleFactor: view.contentScaleFactor) + FrameworkHelper.setVisibleViewport(view.bounds, scaleFactor: mapView?.contentScaleFactor ?? 1) } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {