Open westnordost opened 2 weeks ago
I noticed that the various *GestureDetector
s (shove, move, rotate, scale, ...) each have a field named *threshold
which governs the minimum movement necessary for the gesture detector to detect the movement.
By setting a breakpoint during the map initialization, I noticed that those various *GestureDetector
s actually do have a minimum default threshold set, although I didn't find where it is set.
It was 43.5px for the shove gesture, 18.9px for the scale gesture, 3° for the rotate gesture but 0px for the move gesture.
So, wherever these defaults are set, the move gesture should also get some minimum threshold.
Not sure, maybe at that point, too.
Reading the code vertically, it looks like the LocationCameraController
is only used at all when the LocationComponent
is used. But the usage of the location component itself is optional, as far as I know. I.e. one might just as well not have a location component.
Describe the bug
onMoveBegin(detector: MoveGestureDetector)
in aMapLibreMap.OnMoveListener
is also called when the map is not actually moved but when the user just taps the map.To Reproduce Register an
MapLibreMap.OnMoveListener
and log something ononMoveBegin
. Start the app and tap the map. Something will be logged.Expected behavior
onMoveBegin(detector: MoveGestureDetector)
is only called when the map is movedPlatform information (please complete the following information):
Additional context In StreetComplete, there is a follow-me mode. I.e. the map automatically centers on the current user's location. This is turned off when the user moves the map manually but it should not turn off when the user just taps the map.
Cause of this issue: https://github.com/streetcomplete/StreetComplete/issues/5824