Skip to content

Commit

Permalink
Add render test for filter with expression in. (#9393)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Li authored Mar 10, 2020
1 parent e5db688 commit de2e633
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
Binary file added test/integration/render-tests/filter/in/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions test/integration/render-tests/filter/in/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64
}
},
"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"]
}
}
]
}

0 comments on commit de2e633

Please sign in to comment.