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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
The in expression operator added in #16162 can only be used with paint and layout properties, not with layer filters. To reproduce, load this style and observe that nothing is visible:
mbgl::style::conversion::isExpression() always returns false for the filter ["in", "#", ["get", "color"]], because in is also a legacy filter operator:
The
inexpression operator added in #16162 can only be used with paint and layout properties, not with layer filters. To reproduce, load this style and observe that nothing is visible:colors.json
{ "version": 8, "zoom": 0, "center": [0, 0], "sources": { "quadrants": { "type": "geojson", "data": { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "name": "ABC", "color": "red" }, "geometry": { "type": "Polygon", "coordinates": [[ [-180, -90], [-180, 0], [0, 0], [0, -90], [-180, -90] ]] } }, { "type": "Feature", "properties": { "name": "DEF", "color": "#00ff00" }, "geometry": { "type": "Polygon", "coordinates": [[ [-180, 90], [-180, 0], [0, 0], [0, 90], [-180, 90] ]] } }, { "type": "Feature", "properties": { "name": "GHI", "color": "#0000ff" }, "geometry": { "type": "Polygon", "coordinates": [[ [180, -90], [180, 0], [0, 0], [0, -90], [180, -90] ]] } }, { "type": "Feature", "properties": { "name": "GHI", "color": "#ffff00" }, "geometry": { "type": "Polygon", "coordinates": [[ [180, 90], [180, 0], [0, 0], [0, 90], [180, 90] ]] } } ] } } }, "glyphs": "local://glyphs/{fontstack}/{range}.pbf", "layers": [ { "id": "colors", "type": "fill", "source": "quadrants", "filter": ["in", "#", ["get", "color"]], "paint": { "fill-color": ["get", "color"] } } ] }mbgl::style::conversion::isExpression()always returns false for the filter["in", "#", ["get", "color"]], becauseinis also a legacy filter operator:mapbox-gl-native/src/mbgl/style/conversion/filter.cpp
Lines 56 to 57 in 305df25
/ref mapbox/mapbox-gl-native-ios#183 (comment)
/cc @jmkiley @Chaoba @chloekraw