mapbox / mapbox/mapbox-plugins-android
Problem with dragging points and updating lines in the newest version of the annotation plugin
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 242
- Fork
- 116
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu tại collect_app/src/main/java/org/odk/collect/android/geo/MapboxMapFragment.java, khoảng dòng 914, nơi onAnnotationDrag cập nhật các điểm và đường. Theo dõi AnnotationManager.update qua updateSource và draggableAnnotationController.onSourceUpdated, sau đó so sánh hành vi giữa các phiên bản plugin 9:0.8.0 và 9:0.9.0. Hoàn thành khi việc cập nhật các đường không còn lập tức kết thúc thao tác kéo điểm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, java
- Lĩnh vực
- mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100