mapbox / mapbox/mapbox-plugins-android

Annotation: cannot set `setMoveThreshold`

Open
#1,120 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.