diff --git a/animeal/src/Flows/Main/Modules/Home/Main/View/HomeViewController.swift b/animeal/src/Flows/Main/Modules/Home/Main/View/HomeViewController.swift index 136f593..152bf5f 100644 --- a/animeal/src/Flows/Main/Modules/Home/Main/View/HomeViewController.swift +++ b/animeal/src/Flows/Main/Modules/Home/Main/View/HomeViewController.swift @@ -384,7 +384,7 @@ private extension HomeViewController { latitude: 41.719545681547245, longitude: 44.78956025041992 ) - mapView.easeToLocation(tbilisiCenterCoordinates, duration: 0) + mapView.easeToDefaultZoomLocation(tbilisiCenterCoordinates, duration: 0) userLocationButton.isUserInteractionEnabled = false } } diff --git a/animeal/src/Flows/Main/Modules/Home/Main/View/NavigationMapController.swift b/animeal/src/Flows/Main/Modules/Home/Main/View/NavigationMapController.swift index b6a5d2d..396105b 100644 --- a/animeal/src/Flows/Main/Modules/Home/Main/View/NavigationMapController.swift +++ b/animeal/src/Flows/Main/Modules/Home/Main/View/NavigationMapController.swift @@ -117,6 +117,21 @@ class NavigationMapController: NavigationViewControllerDelegate { ) } + func easeToDefaultZoomLocation( + _ locationCoordinate: CLLocationCoordinate2D?, + duration: TimeInterval + ) { + var cameraOptions = camera(for: [locationCoordinate].compactMap { $0 }) + cameraOptions.zoom = 16.0 + navigationMapView.mapView.camera.ease( + to: cameraOptions, + duration: duration, + curve: .easeOut, + completion: nil + ) + } + + func easeToLocations( _ locationCoordinates: [CLLocationCoordinate2D], duration: TimeInterval,