-
Notifications
You must be signed in to change notification settings - Fork 502
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
CameraUpdate.newLatLngBounds() applies incorrect padding on iOS #1034
Comments
#382 is the pull request that added separate values for padding. |
I think this mapbox/mapbox-gl-native-ios#198 on mapbox-gl-native-ios is also related |
Please review #1039 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, I guess I am facing the same issue on my side : It looks like the Any Update on this ? My workaround for now will be to set the EdgeIndset just before calling the newLatLngBounds method for iOS only. |
First of all a thank you for all the effort everyone is putting on this library. 👍
Here is what I'm trying to do:
create a new
CameraUpdate
object usingCameraUpdate.newLatLngBounds(latlng,...)
with some padding then usecontroller.animateCamera(cameraUpdate)
to update the mapbox's camera position. below is the example codeHere is the problem:
the left and right padding are not being applied as the arguments assigned for them. what is happening is that left and right padding are summed up and then divided by 2 the result will be set for both left and right padding
for example if we set right padding to 100 and left padding to 0 when padding is being applied on iOS instead of applying 100 padding to the right, it is setting left padding to 50 and right padding to 50.
for example if we swap the padding in the example code above with below padding objects the result will not change on iOS.
since in all of the the sum of
left
&right
padding is 100.NOTE that same problem exists for
top
andbottom
paddings.Steps to reproduce on example app
to reproduce this issue in the
example
app go toanimate_camera.dart
and change the value of top and bottom padding on line 96. and click onnewLatLngBounds
button onCamera control, animated
screen. you see that padding does not changeI have tested this on iPhone 7
The text was updated successfully, but these errors were encountered: