-
Notifications
You must be signed in to change notification settings - Fork 122
MGLMapCamera doesn't respect edgePadding on SDK 5.6.0+ #198
Comments
I can confirm that there is an issue with asymmetric In my testing I've attached a ViewController that reproduces the issue. In 5.7.0..5.9.0, i get this for pressing up and/or down: In 5.6.0 i get this for up: and this for down :
|
any news on this issue? |
I think the issue is that previously in the C++ With the new C++ mapbox-gl-native CameraOptions padding field is now used. But when converting to/from MGLMapCamera it's lost. The issue seems to be caused by this change: mapbox-gl-native-ios/platform/ios/src/MGLMapView.mm Lines 4011 to 4025 in a139216
https://github.com/mapbox/mapbox-gl-native-ios/blob/master/platform/darwin/src/MGLMapCamera.h |
@mfazekas As you mentioned, the additive charter of inset management here: mapbox-gl-native-ios/platform/ios/src/MGLMapView.mm Lines 3979 to 3987 in a139216
is lost when converting to/from MGLMapCamera it's lost. Would this approach resolve the issue In short, mapView.contentInset is set to desired value (or use automatically set value) and .zero ( |
I just wanted to understand if #323 should cover this issue. I think this would also cover #86, as I had to resort to the camera inset since fly does not have a api to set the edge inset directly (while setCamera has)
|
Hi, I have the same issue. Environment |
Some of the discussion in mapbox/mapbox-gl-native#15233 may also be relevant. |
confirmed that #323 fixes the issue — would love to see it get merged! |
Any updates on this? Still an issue with 6.2.0 |
Flying to an MGLMapCamera does not respect insets as expected on SDK version 5.6.0+.
Minimal reproducible code:
Expected behavior: zooms to the specified location in the bottom third of the screen. (This works properly on SDK version 5.5.0)
Observed behavior: zooms to the specified location dead center on the screen.
Tested using an iPhone XS running iOS 13.3.1
Screenshots:
5.7.0:
![IMG_AB7EA258F9C0-1](https://user-images.githubusercontent.com/3718504/75909274-c88b7f00-5e19-11ea-934a-f2e3d1147834.jpeg)
5.5.0:
![IMG_D0354889178D-1](https://user-images.githubusercontent.com/3718504/75909325-e527b700-5e19-11ea-96c7-fe9f1a61960c.jpeg)
The text was updated successfully, but these errors were encountered: