-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapView.setOnTouchListener#onTouch is not invoked with Annotations #884
Comments
As a workaround until there is a fix, this ugly trick solves the issue:
|
LineManager is an implementation of AnnotationManager which uses a DraggableAnnotationController which also sets a touchListener on the mapView. Unfortunately, you can only set one touchListener on the The current conclusion is that you can't do both at the same time. One other workaround would be to add a callback to be called before androidGesturesManager.onTouchEvent(event); is triggered. Another one if you are using the androidGesturesManager would be to have is injected in like it's done in the second constructor currently. Could you explain your use case? |
Thanks, in my use case I have a |
You can use your custom Mapview. This mapview extends mapview and override onTouchEvent()
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
Can someone confirm this works ? |
Getting the same problem. I have my MapView inside a RecyclerView, trying to catch onToucheEvent callback but do not get anything so far. Huge problem as my MapView is not scrollable inside my RecyclerView. Does anyone has a fix for this ? |
I just pushed a PR to fix this issue, see #1157. Hope this will help. |
I set
onTouchListener
forMapView
and the code inside the block as below was invoked each time.However, after initializing
LineManager
,View.OnTouchListener
has no effect. What is causing it and how can I fix it?Platform: Android
mapboxAnnotationsVersion = '0.5.0'
The text was updated successfully, but these errors were encountered: