Implement distance-based tile LOD (#4057)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart@emeel.net>
|
After Width: | Height: | Size: 39 KiB |
BIN
metrics/integration/render-tests/tile-lod/default/expected.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
38
metrics/integration/render-tests/tile-lod/default/style.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 72,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 41 KiB |
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["setTileLodMode", "distance"],
|
||||
["setTileLodPitchThreshold", 62],
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 61,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 37 KiB |
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["setTileLodMode", "distance"],
|
||||
["setTileLodScale", 3],
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 72,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 45 KiB |
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["setTileLodMode", "distance"],
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 72,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 40 KiB |
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["setTileLodMinRadius", 1],
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 72,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 41 KiB |
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["setTileLodPitchThreshold", 62],
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 61,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 37 KiB |
BIN
metrics/integration/render-tests/tile-lod/scale/expected.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
39
metrics/integration/render-tests/tile-lod/scale/style.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["setTileLodScale", 3],
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 72,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 53 KiB |
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"maxPitch": 85,
|
||||
"operations": [
|
||||
["setTileLodZoomShift", 2],
|
||||
["wait"]
|
||||
]
|
||||
}
|
||||
},
|
||||
"center": [
|
||||
13.418056,
|
||||
52.499167
|
||||
],
|
||||
"bearing": 30,
|
||||
"pitch": 72,
|
||||
"zoom": 16,
|
||||
"sources": {
|
||||
"satellite": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://demotiles.maplibre.org/debug-tiles/number/{z}.png"
|
||||
],
|
||||
"maxzoom": 22,
|
||||
"tileSize": 256
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "raster",
|
||||
"type": "raster",
|
||||
"source": "satellite",
|
||||
"paint": {
|
||||
"raster-fade-duration": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||