Closed kodebach closed 2 months ago
Thanks for the report. Makes sense, could you make a PR?
Ideally MapLibre would let us configure logging via a custom logging interface instead of using Timber directly
Feel feel to create an issue for this as well if this is important for you.
Makes sense, could you make a PR?
See #2580
Feel feel to create an issue for this as well
I'll open an issue, but currently its not important, if the "Could not call onMove" goes away. We've not seen any other log messages that were problematic.
Describe the bug We are seeing lots of automatic error report from our app with the message "Could not call onMove with parameters 0.0,0.0" coming from MapLibre. We get these report, because both our app and MapLibre use Timber for logging, and we use a Timber to automatically send error level logs to Sentry.
At first we thought these were somewhat random and there is some odd edge case that produces these messages, however, we are now able to consistently reproduce the issue.
To Reproduce Steps to reproduce the behavior:
Expected behavior No error level log messages when performing legitimate actions like rotating the map.
Ideally MapLibre would let us configure logging via a custom logging interface instead of using Timber directly, but that is a different issue.
Platform information (please complete the following information):
Additional context This is where the error is logged:
https://github.com/maplibre/maplibre-native/blob/5d5bd84d95f3692fa1bf05931cbf2fd1e222a6ce/platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/maps/MapGestureDetector.java#L490-L509
There is even a comment, that a move event without distance is expected and a check against 0. But then the error is still logged, if both
distanceX
anddistanceY
are zero. So unless there is a reason why the function should never be called with0, 0
, the solution seems to be to changeelse
into