Closed munnitz closed 2 years ago
@munnitz Thanks for reporting. What's the width and height of mapview?
@Chaoba The map's dimensions are w1080 x h1794
@munnitz I have tried with your points and padding, but still can't reproduce this issue. Can you provider a demo or a branch in this repo that could reproduce this? Thanks.
We got the same issue as reported by @munnitz
On map we are showing location of an object X and user location, with priority on location of an X.
If we zoom in to user location shown on map and call the flyTo(cameraPosition, animationOptions) with valid user coordinates, we got the same crash.
Will be fixed by https://github.com/mapbox/mapbox-maps-android/pull/1271 and available in v10.5.0-rc.1
release.
Environment
Observed behavior and steps to reproduce
Crash when calling
map.flyTo(map.cameraForCoordinates(visibleCoordinates, padding = padding))
We place a bottomsheet above our map and update the padding every time the bottomsheet is dragged in order to correctly center the
visibleCoordinates
. Problem ist that sometimes the app crashes when dragging the bottomsheet and by that updating the padding values. Resulting in the following stack trace:However I am not passing any coordinates with Lat=NaN. At the time of the crash,
visibleCoordinates
contains the following dataThe padding is
[top: 168.0, left: 105.0, bottom: 1002.0, right: 105.0]
Calling
map.flyTo(map.cameraForCoordinates(visibleCoordinates))
without the padding seems to work fine.