mapbox / mapbox/mapbox-plugins-android
Draggable Symbols not working when setting mapview.setOnTouchListener(null)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 242
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Hi, in my application I create symbols on the MapView using a SymbolManager and provide an option for dragging them by calling symbol.setDraggable(true) .
However, if I draw a line on the map and after finish drawing it I call mapView.setOnTouchListener(null), symbols can no longer be dragged. (followed guide Drawing Search Area: https://docs.mapbox.com/android/maps/examples/finger-draw-query/ )
Everything else (clicking and long clicking on lines, symbols etc) seems to be working ok. Also all other gestures (pan, zoom etc). I don't understand how setting the touch listener to null disables dragging the symbols.
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 by reproducing the Drawing Search Area flow from the linked guide: create draggable symbols, draw a line, then call MapView.setOnTouchListener(null). Read the MapView touch-listener handling alongside the SymbolManager drag flow. Done means symbols remain draggable after the listener is cleared while existing clicks, long clicks, panning, and zooming still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100