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
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Devices affected: iPhone 12 pro, iPhone 14 pro, iPhone 6s (all I could test on, I am guessing all devices are)
Maps SDK Version: 10.6.0
Observed behavior and steps to reproduce
When using a mapView and using mapView.camera.fly(to:, duration:, completion:), mapViews camera will sometimes not fly to desired bounds.
-Create a MapView
-Generate custom Bounds (in my case a Function returns the most south, West, North & East coordinates of all steps of a route to make sure to fit the whole route on the screen (function very well tested, works for sure)) and use them to...
-Create a camera object using mapView.mapboxMap.camera(for:, padding: , bearing: , pitch: )
-Use mapView.camera.fly(to:, duration:, completion:) to fly to the camera we've just created
This will work most of the time, but will sometimes just not work without any error. It just does not move the screen at all. I have tested a lot but can't seem to find a pattern as to whether it works or not. It fails most of the time when being zoomed in to the max, but also fails sometimes when doing the exact same thing I did the time before when it worked... I am printing the bounds I calculated and I am plotting them on a map to check if they are correct - that's never the issue.
When drawing a route, for example, the route is currently sometimes mostly off-screen, which is bad.
Expected behavior
The MapView should fly to fit the bounds we have set, at any cost, or at least give back an error that we can work with. Right now, I cannot find what causes this because of missing feedback.
Environment
Observed behavior and steps to reproduce
When using a mapView and using mapView.camera.fly(to:, duration:, completion:), mapViews camera will sometimes not fly to desired bounds.
-Create a MapView
-Generate custom Bounds (in my case a Function returns the most south, West, North & East coordinates of all steps of a route to make sure to fit the whole route on the screen (function very well tested, works for sure)) and use them to...
-Create a camera object using mapView.mapboxMap.camera(for:, padding: , bearing: , pitch: )
-Use mapView.camera.fly(to:, duration:, completion:) to fly to the camera we've just created
This will work most of the time, but will sometimes just not work without any error. It just does not move the screen at all. I have tested a lot but can't seem to find a pattern as to whether it works or not. It fails most of the time when being zoomed in to the max, but also fails sometimes when doing the exact same thing I did the time before when it worked... I am printing the bounds I calculated and I am plotting them on a map to check if they are correct - that's never the issue.
When drawing a route, for example, the route is currently sometimes mostly off-screen, which is bad.
Expected behavior
The MapView should fly to fit the bounds we have set, at any cost, or at least give back an error that we can work with. Right now, I cannot find what causes this because of missing feedback.
Notes / preliminary analysis
Additional links and references
Originally posted by @JanTG1 in mapbox/mapbox-maps-ios#1598
The text was updated successfully, but these errors were encountered: