mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

feature-state expression is incorrectly evaluated in queryRenderedFeatures

Open osvodef opened this issue 5 years ago • 1 comments

mapbox-gl-js version: 1.12.0

browser: Google Chrome v86

Steps to Trigger Behavior

  1. Use feature-state expression in a paint property for a symbol feature
  2. Query this feature using queryRenderedFeatures

Link to Demonstration

https://jsfiddle.net/osvodef/sdtr63jp/24/

Expected Behavior

Feature state is taken into account, correct value of the property is returned.

Actual Behavior

Default value of the property is returned.

The bug only affects symbol features. As far as I understood, this is because lookupSymbolFeatures doesn't pass sourceFeatureState arg to loadMatchingFeatures (in the file feature_index.js).

osvodef avatar Nov 14 '20 14:11 osvodef

I just stumbled across this and I can confirm this is still an issue. Are there any easy ways to fix this or any plans on prioritizing this bug?

ssaornil avatar Feb 06 '24 09:02 ssaornil