Making click event to accept multiple layers
Motivation
Sometimes users would like to select a mouse event from the top most features where the features span across multiple layers. Since the event API only accepts single layer ID, developers have to combine events somehow.
Design Alternatives
Enabling the same design for the event listener as map.queryRenderedFeatures where you can pass a feature from an array of features.
For example:
map.on('click', ['layer-id-1', 'layer-id-2'], function() {})
Nice feature, looking forward to it.
I have the same needs
I'm sure a lot of people would love that feature (I'm one of them)
can I take this as my first contrib?
PR: https://github.com/mapbox/mapbox-gl-js/pull/10954