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
Apply filter expression to a source where the property used in the get expression does not exist for the feature.
Use a to-number expression to convert the null value to 0.
Link to Demonstration
jsFiddle (please open devTools to see relevant console warnings).
Expected Behavior
Non-existent property value should be converted to 0 as described in the to-number documentation.
Actual Behavior
A console warning Could not convert null to number. is created.
I am using this approach in filter expressions as described in this issue. It also appears that the existing tests contradict the to-number null value handling described in the documentation.
The text was updated successfully, but these errors were encountered:
Question about the behavior if someone has a moment to answer --
If the the "to-number" function returns 0 from null, doesn't this conflict with parsing a string of '0'? Fore example, if I'm hoping to conditionally style in the following way:
mapbox-gl-js version: 0.47.0
browser: Chrome 67.0.3396.87
Steps to Trigger Behavior
Link to Demonstration
jsFiddle (please open devTools to see relevant console warnings).
Expected Behavior
Non-existent property value should be converted to 0 as described in the to-number documentation.
Actual Behavior
A console warning
Could not convert null to number.
is created.I am using this approach in filter expressions as described in this issue. It also appears that the existing tests contradict the
to-number
null value handling described in the documentation.The text was updated successfully, but these errors were encountered: