-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS: camera.zoom calculates smaller zoom for camera(for:) initially #2170
Comments
Hey, @mfazekas I'm currently working on the issues with camera(for:) and will take a look at this too. Thank you, for the reproduction steps! |
Hi @aleksproger - any updates on findings for this issue? |
@mfazekas hey! do you observe similar problem in Android in v11.4.0-rc.1 when using async overload of |
@kiryldz sorry, I cannot comment on that, this was reported as an iOS only issue, so this might not have surfaced on android beacuse timing or other |
+1 on this SDK Version (iOS): v11.5.1 I have to stay on v10.x until it's fixed :( |
v11.6.0, ios |
Hello @aleksproger any update on this? |
@aleksproger any updates? it is really unpleasant bug |
I found solution:
|
Environment
Observed behavior and steps to reproduce
CameraOptions
calculated forcamera(for: coordinates)
just after map is added to a view is smaller than when calculated fromonStyleDataLoaded
When calculated just after map added to a view the zoom is less than the ideal (:
When calculated from
onStyleDataLoaded
the zoom is correct:To reproduce use the code snippet at the end of the report to replace
BasicMapExample
in theApps/Examples
Xcode project.Observe the zoom values printed and uncomment the setCamera in
onStyleDataLoaded
handler to verify that that the zoom value is correct there.Expected behaviour
Either
camera(for:)
should return an error, so signal that it's not in the state to calculate CameraOption correctly or return the correct camera settings (zoom!) for the actual bounds. I don't think any map loading is needed for that calculation.Notes / preliminary analysis
Additional links and references
https://github.com/rnmapbox/sponsors/issues/3
The text was updated successfully, but these errors were encountered: