Open enersis-pst opened 3 years ago
Thanks for the report, @enersis-pst, and thanks very much for the demonstration! Just to add some context, the queryRenderedFeatures docs say:
The topmost rendered feature appears first in the returned array, and subsequent features are sorted by descending z-order.
so that this does sound like a bug to me (or at the very least something which requires clear explanation in the docs if, for some technical reason, this behavior is currently expected/necessary).
If symbol-sort-key is used the markers are visuell sorted by a property. But by click on the higher marker the lower will be first in the list of queryRenderedFeatures.
mapbox-gl-js version: 2.3.1
browser: Chrome
Steps to Trigger Behavior
Link to Demonstration
https://jsfiddle.net/7t02vbhc/63/
Expected Behavior
console should output A
Actual Behavior
console output B