Skip to content
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

Map click listener (no symbol selected) #1136

Closed
kevinvanmierlo opened this issue Jun 25, 2020 · 5 comments
Closed

Map click listener (no symbol selected) #1136

kevinvanmierlo opened this issue Jun 25, 2020 · 5 comments

Comments

@kevinvanmierlo
Copy link

Right now it's only possible to listen to clicks on symbols. But I want to deselect the symbols when clicked on the map and not on a symbol. Right now there isn't an easy way to know if the user clicked on the map.
Also it would be awesome to make it a little more extensible. Maybe allow the overriding of the MapClickResolver, so we can handle our own click handling.

@Ph0tonic
Copy link
Contributor

It seems to me that you can already add a clickListener on the map using mapboxMap.addOnMapClickListener(...);.

@kevinvanmierlo
Copy link
Author

@Ph0tonic Unfortunately not. addOnMapClickListener is also used by the plugin and is the default way to see if a symbol is clicked. So if I add another addOnMapClickListener it just calls both methods. But there is no way to check if just the map was pressed or a symbol.

@Ph0tonic
Copy link
Contributor

You are right, this has been fixed but has not been released yet, see #966 and PR #1124.

@kevinvanmierlo
Copy link
Author

@Ph0tonic Awesome! I will close this issue then

@langsmith
Copy link
Contributor

0.9.0 has gone out and should resolve this ticket. #1149. Please re-open and comment if this issue is still being seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants