-
Notifications
You must be signed in to change notification settings - Fork 122
Add padding to MGLMapCamera #323
base: main
Are you sure you want to change the base?
Conversation
Can anyone give an update on what's blocking this PR? Would love to see it get merged! |
@@ -4045,6 +4052,9 @@ - (MGLMapCamera *)cameraForCameraOptions:(const mbgl::CameraOptions &)cameraOpti | |||
{ | |||
options.pitch = camera.pitch; | |||
} | |||
if (! MGLEdgeInsetsEqual(camera.padding, MGLEdgeInsetsZero)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is correct, as there is edgePadding as argument as well as in padding in MGLMapCamera. The padding in MGLMapCamera overwrites the param here.
This bug is currently preventing us from updating our app past Mapbox 5.6.0 (iOS), waiting on this fix to be merged in order to do so. |
Any news on this ? I'm blocked by this one too |
👍 |
@1ec5 @julianrex Any updates on this? It's still broken in 6.2.0. |
Also waiting for this to get merged |
Is there any particular reason why this hasn't been merged almost a year after the PR was submitted? This is a rather glaring bug in my book and it's actively preventing me from properly implementing essential features. I implore the maintainers to please review this PR |
<changelog>Fixed assymetric edgePadding in
MGMapView.camera:....</changelog>
Fixes: #198
mapbox-gl-native changed how
cameraForLatLngs
handles edgePadding. Before #16067 the edgePadding caused thecenter
ofCameraOptions
to be changed. After#16067 the
padding
inCameraOptions
was used.The
MGLMapCamera
in iOS layer did not have apadding
and therefore in5.7.0
and later this padding got lost.This PR adds a
padding
toMGLMapCamera
and also adjust conversion betweenCameraOptions
andMGLMapCamera
to use this padding.