Problem with dragging points and updating lines in the newest version of the annotation plugin
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- android, java
- Domain
- mobile-dev
Research direction
Start at collect_app/src/main/java/org/odk/collect/android/geo/MapboxMapFragment.java around line 914, where onAnnotationDrag updates points and lines. Trace AnnotationManager.update through updateSource and draggableAnnotationController.onSourceUpdated, then compare the behavior between plugin versions 9:0.8.0 and 9:0.9.0. Done means updating lines no longer immediately terminates point dragging.
Written by the indexing model from the issue text.
Description
Hi!
I'm a developer working on GetODK in our mobile app we use Mapbox and the annotation plugin which we wanted to update to the newest version 9:0.9.0 but we discovered regression.
In our app we allow selecting points on a map and we draw lines between them (it's geo shape or geo trace). We also allow dragging those points and redrawing those lines while dragging so that everything is smooth:

The problem is that after updating to 9:0.9.0. The dragging process is terminated immediately after starting when we update lines (calling AnnotationManager.update(T annotation).
The implementation is here https://github.com/getodk/collect/blob/master/collect_app/src/main/java/org/odk/collect/android/geo/MapboxMapFragment.java#L914
we override onAnnotationDrag to update points and lines.
The problem seems to be in updating lines because when we call
AnnotationManager.update(T annotation) -> updateSource() -> draggableAnnotationController.onSourceUpdated() -> stopDragging(draggedAnnotation) and as result our dragging process is immediately stoped.
It wasn't the case in v9:0.8.0. Could someone explain why this behavior changed and why when we want to update lines the dragging process is terminated?
- Dominant language
- Java
- Stars
- 242
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
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.
More from mapbox/mapbox-plugins-android
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
mapbox/mapbox-plugins-android#1207 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
mapbox/mapbox-plugins-android#1206 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
mapbox/mapbox-plugins-android#1203 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
mapbox/mapbox-plugins-android#1195 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mapbox/mapbox-plugins-android#1193 · 1 comment ·
All issues in mapbox/mapbox-plugins-android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100