-
Notifications
You must be signed in to change notification settings - Fork 502
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
Missing option to disable onSymbolTapped event to get propagated to onMapClick event #348
Comments
@nheumann Not with the current release, unfortunately, but this has been fixed upstream (mapbox/mapbox-plugins-android#1124) and when that fix is released in the Mapbox Annotation plugin, we'll update our dependency and fix this. |
@m0nac0 Thank you for your quick reply. How about web and iOS? |
@nheumann You're welcome. This bug has only been reported for Android so far, are you also experiencing this on web and iOS? |
@m0nac0 I tested this in the sample app and it occurs for Android and also web. iOS works as expected. |
@nheumann Thanks for testing it, we'll have to look into that as well then. |
@andrea689 Do you know how we could solve this for web? I've tried adding a stopPropagation() method to the |
I went around this problem like this. Clicking on the symbol first fires onSymbolTapped and then onMapClick. After clicking the symbol, I immediately set a variable whose default is false to true. I set it to false after 100 milliseconds. I would ignore onMapClick if this value is true. |
The fix has been released upstream 👍 |
@Ph0tonic Thank you for fixing it! I actually (and coincidentally 😄 ) just now finished testing and opened the PR . |
The issue is resolved on Android but still appears on web. |
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. |
I have a use case where I need to detect whether the map - but not a symbol - was clicked. As the onSymbolTapped event also propagates the event to the underlying map layer, the onMapClick event is also called when a symbol is clicked. I want this behaviour:
Is there a way to achieve this with the existing release?
The text was updated successfully, but these errors were encountered: