You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I noticed that setFilter and setFeatureState work fine with the same expression.
mapInstance.setFilter('seat', ["match", ["id"], "GMYTEORRGI5DQ", true, false]); //Works fine
GIF with setFilter:
No idea why ["id"] filter works with numeric feature id(No promoteId), but ["id"] doesn't work as soon as I apply promoteId in geojson source and try to fetch the feature with string id.
The text was updated successfully, but these errors were encountered:
dollysingh3192
changed the title
Mapbox filter is not giving Correct result, when using promotId.
Mapbox filter is not giving Correct result, when using promoteId.
Jan 5, 2021
dollysingh3192
changed the title
Mapbox filter is not giving Correct result, when using promoteId.
queryRenderedFeatures filter is not giving correct result, when using promoteId.
Jan 6, 2021
I think I noticed this bug today, not using promoteId but using a string as the feature id. A result from queryRenderedFeatures doesn't work when passed to setFeatureState; but the same feature does work when it's passed from a click handler.
Good Day,
I have a geojson (similar to below) and I am facing trouble with an expression that works well when used without promoteId.
GeoJson
Expected Behavior
Below expression is working fine and extract one feature from Map(Without using promoteId):
Working GIF:

Actual Behavior
But on using promoteId in geojson source, the expression is not working at all.
Not Working GIF:

However, I noticed that setFilter and setFeatureState work fine with the same expression.
GIF with setFilter:

No idea why ["id"] filter works with numeric feature id(No promoteId), but ["id"] doesn't work as soon as I apply promoteId in geojson source and try to fetch the feature with string id.
JsBin Link:
Edit: I am attaching a fiddle https://jsfiddle.net/dollysingh3192/w6bzsx84/7/ where on console log on mousemove ["id"] filter returns an empty array.
The text was updated successfully, but these errors were encountered: