Open
Description
Environment
- Xcode version: 13.2.1
- iOS version: all, but simulator iOS 15.2 exhibits it
- Devices affected: ipad
- Maps SDK Version: 10.2.0
Observed behavior and steps to reproduce
If you try to fly to a location or geometry with a top edge inset that is sufficiently larger than the bottom edge inset, then the animation will jerk at the end and the map will have a weird margin at the top of the view.
This code added to the viewDidLoad() method in the BasicMapExample will show the bug:
mapView.mapboxMap.onEvery(.mapLoaded) { _ in
let options = CameraOptions(center: .init(latitude: 40, longitude: 40), padding: .init(top: 250, left: 30, bottom: 50, right: 33))
self.mapView.camera.fly(to: options, duration: 1 )
}
Expected behavior
The map should fly to the position smoothly and not have a strange margin at the top.
If you change the top edge inset to 50 then it will work as expected.
Notes / preliminary analysis
No idea why this doesn't work but it interferes with the padding that we would like to apply to our application.