Skip to content

Commit

Permalink
Render tests for layer zoom visibility (#6455)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasPaczos authored Apr 12, 2018
1 parent 8fa3d4d commit 13ea16d
Show file tree
Hide file tree
Showing 12 changed files with 294 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.
46 changes: 46 additions & 0 deletions test/integration/render-tests/zoom-visibility/above/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"operations": [
[
"setZoom",
2.1
],
[
"wait"
],
[
"setLayerZoomRange",
"circle",
1,
2
],
[
"wait"
]
]
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"layers": [
{
"id": "circle",
"type": "circle",
"source": "geojson"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions test/integration/render-tests/zoom-visibility/below/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"operations": [
[
"setZoom",
0.9
],
[
"wait"
],
[
"setLayerZoomRange",
"circle",
1,
2
],
[
"wait"
]
]
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"layers": [
{
"id": "circle",
"type": "circle",
"source": "geojson"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions test/integration/render-tests/zoom-visibility/in-range/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"operations": [
[
"setZoom",
2.1
],
[
"wait"
],
[
"setLayerZoomRange",
"circle",
1,
2
],
[
"wait"
],
[
"setZoom",
1.5
],
[
"wait"
]
]
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"layers": [
{
"id": "circle",
"type": "circle",
"source": "geojson"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"operations": [
[
"setZoom",
1.5
],
[
"wait"
],
[
"setLayerZoomRange",
"circle",
1,
2
],
[
"wait"
],
[
"setZoom",
2.1
],
[
"wait"
]
]
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"layers": [
{
"id": "circle",
"type": "circle",
"source": "geojson"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions test/integration/render-tests/zoom-visibility/was-above/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"operations": [
[
"setZoom",
2.1
],
[
"wait"
],
[
"setLayerZoomRange",
"circle",
1,
3
],
[
"wait"
]
]
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"layers": [
{
"id": "circle",
"type": "circle",
"source": "geojson",
"minzoom": 1,
"maxzoom": 2
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions test/integration/render-tests/zoom-visibility/was-below/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"operations": [
[
"setZoom",
0.9
],
[
"wait"
],
[
"setLayerZoomRange",
"circle",
0,
2
],
[
"wait"
]
]
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"layers": [
{
"id": "circle",
"type": "circle",
"source": "geojson",
"minzoom": 1,
"maxzoom": 2
}
]
}

0 comments on commit 13ea16d

Please sign in to comment.