mapbox / mapbox/mapbox-plugins-android
Problem with dragging points and updating lines in the newest version of the annotation plugin
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 242
- Forks
- 116
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en collect_app/src/main/java/org/odk/collect/android/geo/MapboxMapFragment.java alrededor de la línea 914, donde onAnnotationDrag actualiza puntos y líneas. Sigue AnnotationManager.update a través de updateSource y draggableAnnotationController.onSourceUpdated, y compara el comportamiento entre las versiones del plugin 9:0.8.0 y 9:0.9.0. Se considera terminado cuando actualizar las líneas ya no termina inmediatamente el arrastre de puntos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- android, java
- Área
- mobile-dev
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100