Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

## Environment #2788

Open
Deloww opened this issue Sep 30, 2022 · 0 comments
Open

## Environment #2788

Deloww opened this issue Sep 30, 2022 · 0 comments

Comments

@Deloww
Copy link

Deloww commented Sep 30, 2022

Environment

  • Xcode version: 14.0
  • iOS version: 16.0
  • 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.

Notes / preliminary analysis

Additional links and references

Originally posted by @JanTG1 in mapbox/mapbox-maps-ios#1598

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant