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
Hi @jlocus, thanks for the report! There is indeed an issue here: the filter ['all', ['>=', 'Constructi', 1930], ['>=', ['zoom'], 10]] is invalid, and should have produced a validation error. I believe what you wanted was ['all', ['>=', ['number', ['get', 'Constructi']], 1930], ['>=', ['zoom'], 10]] -- note the use of number and get expressions as shown in the help guide. I've opened a PR that tightens up the validation to catch issues like this in the future.
(Also note that you can't mix the old filter syntax and new expression syntax in the same filter -- if the filter uses any new expression syntax, then the whole thing must be a valid expression.)
mapbox-gl-js version: 0.41.0
Steps to Trigger Behavior
Start from the "Final Product" example here: https://www.mapbox.com/help/mapbox-gl-js-expressions/
Modify the code to add a 'Filter' clause using both the 'Constructi' property and ['zoom']:
'filter': ['all', ['>=', 'Constructi', 1930], ['>=', ['zoom'], 10]]
Example at: https://jsbin.com/losiwikipa/edit?html,output
Expected Behavior
Red circles should appear for items constructed after 1930 when the zoom level is >= 10
Actual Behavior
No red circles appear under any circumstances
These "all" clauses both work as expected:'
The text was updated successfully, but these errors were encountered: