Skip to content

Commit

Permalink
Add tests for fill-sort-key
Browse files Browse the repository at this point in the history
  • Loading branch information
ahk committed Jun 24, 2019
1 parent 3db6e9d commit d61792d
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions test/integration/render-tests/fill-sort-key/literal/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"version": 8,
"metadata": {
"test": {
"height": 32,
"width": 32
}
},
"center": [0, 0],
"zoom": 1,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"color": "red",
"sort-key": 1
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[ -2, -2 ],
[ -2, 2 ],
[ 2, 2 ],
[ 2, -2 ],
[ -2, -2 ]
]
]
}
},
{
"type": "Feature",
"properties": {
"color": "green",
"sort-key": 0
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[ -3, -3 ],
[ -3, 1 ],
[ 1, 1 ],
[ 1, -3 ],
[ -3, -3 ]
]
]
}
},
{
"type": "Feature",
"properties": {
"color": "blue",
"sort-key": 2
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[ -1, -1 ],
[ -1, 3 ],
[ 3, 3 ],
[ 3, -1 ],
[ -1, -1 ]
]
]
}
}
]
}
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "fill",
"type": "fill",
"source": "geojson",
"layout": {
"fill-sort-key": ["get", "sort-key"]
},
"paint": {
"fill-color": ["get", "color"],
"fill-antialias": false
}
}
]
}

0 comments on commit d61792d

Please sign in to comment.