You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
I'm implementing a Draggable custom MarkerView in my application. The issue is, MarkerView does not delegate the touch events to my MapView touch listener. So when I click on the MarkerView and try to move it, no touch events are getting registered but if I move outside the marker area, I'm able to move MarkerView. Any solutions or hints to achieve this? @tobrun
I will be happy to implement a separate activity inside Test App to showcase this issue if needed. If this issue is solved, I will also implement a DraggableMarkerActivity inside Annotations package in the Mapbox Test App for developers looking to implement Drag feature #2450 .
Thanks!
The text was updated successfully, but these errors were encountered:
@BharathMG thank you for you enthusiasm for getting draggable markers implemented!
The issue is, MarkerView does not delegate the touch events to my MapView touch listener.
Current implementation touch handling
Yes, touch events on MarkerViews are currently handled as finished when a click occurs because we are using an OnClickListener for it. OnClickListener interrupts the chain of the OnTouchListeners by returning true in the OnTouch method.
Next steps for touch handling
I need to note that we are currently working on removing the OnClickListener and moving the touch logic to core instead of the Android binding itself. This is what iOS is already doing since they introduced view annotations.
As a result of this change Draggable MarkerViews will need to be implemented in a slightly different way but we also give you the freedom to actual use that OnTouch event that you are requesting.
You can read about the issue here: #5388
And related pull request for it is here: #5639
Getting Draggable MarkerView implemented
The actual feature request for this is in #2450 and I'm going to close this in favour of that one. I will add some thoughts on how I think it could be implemented since you are not the only one requesting this.
i want to add draggable fuctionality in mapbox but there is no method like google provides buts its very neccessay for us to implement dragable marker or polyline???
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm implementing a Draggable custom MarkerView in my application. The issue is, MarkerView does not delegate the touch events to my MapView touch listener. So when I click on the MarkerView and try to move it, no touch events are getting registered but if I move outside the marker area, I'm able to move MarkerView. Any solutions or hints to achieve this? @tobrun
I will be happy to implement a separate activity inside Test App to showcase this issue if needed. If this issue is solved, I will also implement a DraggableMarkerActivity inside Annotations package in the Mapbox Test App for developers looking to implement Drag feature #2450 .
Thanks!
The text was updated successfully, but these errors were encountered: