mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.35k stars 1.33k forks source link

paddings are not working as expected with easeCamera #16580

Open astoriawinter opened 3 years ago

astoriawinter commented 3 years ago

Hello, In our android project we use the old mapbox padding API (MapboxMap.setPadding), and now we decided to move to the new one(9.4.0 version). Somehow, new paddings are not working as expected. I tried to call CameraUpdateFactory#paddingTo and (move/ease/animate Camera) with this update and after that access paddings array from CameraPosition. In the case of calling moveCamera current paddings array is returned as expected, paddings were applied. In the case of easeCamera or animateCamera current paddings returns an array of 0, paddings are not applied.

moveCamera https://user-images.githubusercontent.com/23267221/104594372-1d2a9800-5682-11eb-8aea-33f390a99d40.mp4
easeCamera https://user-images.githubusercontent.com/23267221/104594526-5400ae00-5682-11eb-8553-d95ee9817e20.mp4

Sadly, moveCamera is not smooth, so we can't use it. Can you please give some clues about why paddings work that way and how to fix it?