-
Notifications
You must be signed in to change notification settings - Fork 126
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
[BUG] onMapClick not fired when tapping SymbolLayer #506
Comments
I am facing a similar issue. I have simply added a marker using the .addSymbol() function to the map. When tapping on the added marker on the map I would like to obtain the information of the newly added marker, but the onMapClick callback isnt seem to be triggering. However, the onMapClick callback works when tapping on other areas of the base map. My code implementation looks something like this:
Is there some other way of doing this? or what am I doing wrong? |
Platforms
Android en iOS
Version of flutter maplibre_gl
0.20
Bug Description
I am adding a vector source to the map. After that, I add a SymbolLayer. Then, in the onMapClick event, I use the queryRenderedFeaturesInRect function to query all features that I click on. This function works fine when I click on the base map, but when I click on a symbol from my self-added vector layer, the onMapClick event is not triggered. When I retrieve the style IDs for the current style, it’s clear that my own SymbolLayer has been correctly added and exists.
Steps to Reproduce
Expected Results
Getting my own added features after onMapClick and queryRenderedFeaturesInRect.
Actual Results
Only features from basemap are triggering onMapClick. When clicking on a feature of the custom vector source, onMapClick is not fired.
Code Sample
Adding vector source:
Add layer:
onMapClick:
The text was updated successfully, but these errors were encountered: