-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Accept multiple layers for Map#on #4578
Comments
Thanks for creating the issue! Want to go slightly further and submit a pull request for this? Should be a quick change. |
Hi there! If you don't mind, I've created PR for this issue #4596. I'm not sure about comparing |
This is a great question. Specifically, how should the following cases behave:
The ambiguity and additional complexity of these cases makes me think we probably shouldn't implement this. If someone needs it, they can add/remove listeners in a loop. |
Let's keep the API simple. |
This actually makes sense. Thanks for review! |
#1002 (pull #4329) added a
layer
parameter toMap#on
to handle mouse-related events for a specific layer. Currently,on
accepts a single layer. It would be great if passing in an array of layers was supported. I believe this would make handling mouse-events even easier.The text was updated successfully, but these errors were encountered: