mapbox / mapbox/mapbox-plugins-android
Annotation: cannot set `setMoveThreshold`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 242
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
We have SymbolManger with Symbol annotations. When tapping on the annotation we do receive `onAnnotationDragStarted`.
We'd like to configure GestureManager with [setMoveThreshold](https://docs.mapbox.com/android/api/gestures/0.5.1/com/mapbox/android/gestures/MoveGestureDetector.html#setMoveThreshold-float-) so we can receive taps without drag.
However that's not possible as annotation manger does not expose the AndroidGesturesManager used.
https://github.com/react-native-mapbox-gl/maps/issues/836
We'd like to access this gesture manager:
https://github.com/mapbox/mapbox-plugins-android/blob/5c52f6676ec88c8a01b86cb7bea94bb8cdffa8a6/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/DraggableAnnotationController.java#L33
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with DraggableAnnotationController.java at the linked line and trace how SymbolManager annotations obtain their gesture manager. Check how the annotation manager could expose the AndroidGesturesManager and configure setMoveThreshold. Done means consumers can access that manager and receive annotation taps without unintended drag behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100