You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my iOS app, users can search for a location and tap on any search result. Upon tapping, the map animates to center on the selected location by adjusting the viewport. However, sometimes after the animation completes, the map appears blurred even though the user is at the correct location. The blur disappears when the user interacts with the map, such as by zooming in or out.
Video Demonstration of Issue: In this video, I searched for multiple locations. Notice that when I search for and animate to 'Cuba', the map appears blurred after the animation. The blur disappears once I interact with the map.
Screen.Recording.2025-02-18.at.12.1k2.50.PM.mp4
Code Snippet:
MapReader{ _ inMap(viewport: $viewport)
// MARK: - for places update camera
.onChange(of: updateCoordinate){ _ iniflet coordinates = selectedCoordinates {
// Step 1: Zoom out and rotate the globe
withViewportAnimation(.easeInOut(duration:1.5)){
viewport =.camera(
center:CLLocationCoordinate2D(
latitude: coordinates.latitude,
longitude: coordinates.longitude
), // Roughly set the direction
zoom:2,
bearing:0)}
// Roughly set the direction
// detach from the plane if the animation is in progress
DispatchQueue.main.asyncAfter(deadline:.now()+1.5){withViewportAnimation(.easeInOut(duration:2)){
viewport =.camera(
center:CLLocationCoordinate2D(
latitude: coordinates.latitude,
longitude: coordinates.longitude
),
zoom:12,
bearing:0)}}}}}
Expected behavior
Once the animation completes, the map should appear clear and sharp without requiring any user interaction.
The text was updated successfully, but these errors were encountered:
Environment
Observed behavior and steps to reproduce
In my iOS app, users can search for a location and tap on any search result. Upon tapping, the map animates to center on the selected location by adjusting the viewport. However, sometimes after the animation completes, the map appears blurred even though the user is at the correct location. The blur disappears when the user interacts with the map, such as by zooming in or out.
Video Demonstration of Issue: In this video, I searched for multiple locations. Notice that when I search for and animate to 'Cuba', the map appears blurred after the animation. The blur disappears once I interact with the map.
Screen.Recording.2025-02-18.at.12.1k2.50.PM.mp4
Code Snippet:
Expected behavior
Once the animation completes, the map should appear clear and sharp without requiring any user interaction.
The text was updated successfully, but these errors were encountered: