diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-01-04 12:30:13 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-01-15 11:59:26 +0100 |
commit | 21e4029acf757898da8695474f94642f9858acd8 (patch) | |
tree | 567a10b18b4f1b573de5ae151018f6518244138a /test/fixtures | |
parent | 957415823a003111f6efecd1a1552a30f999235a (diff) | |
download | qtlocation-mapboxgl-21e4029acf757898da8695474f94642f9858acd8.tar.gz |
[core] use stale styles
This adds support for using cached styles that are stale. They're treated like changing styles; when the refreshed style changed compared to the one we've already had, we're swapping out the entire style, which might cause a slight flicker.
Diffstat (limited to 'test/fixtures')
-rw-r--r-- | test/fixtures/stale/0-0-0.vector.pbf | bin | 0 -> 482553 bytes | |||
-rw-r--r-- | test/fixtures/stale/stale_style/expected.png | bin | 0 -> 13447 bytes | |||
-rw-r--r-- | test/fixtures/stale/streets.json | 14 | ||||
-rw-r--r-- | test/fixtures/stale/style.json | 25 |
4 files changed, 39 insertions, 0 deletions
diff --git a/test/fixtures/stale/0-0-0.vector.pbf b/test/fixtures/stale/0-0-0.vector.pbf Binary files differnew file mode 100644 index 0000000000..a0f049ad43 --- /dev/null +++ b/test/fixtures/stale/0-0-0.vector.pbf diff --git a/test/fixtures/stale/stale_style/expected.png b/test/fixtures/stale/stale_style/expected.png Binary files differnew file mode 100644 index 0000000000..d3c6ef3cd5 --- /dev/null +++ b/test/fixtures/stale/stale_style/expected.png diff --git a/test/fixtures/stale/streets.json b/test/fixtures/stale/streets.json new file mode 100644 index 0000000000..11cb5c8557 --- /dev/null +++ b/test/fixtures/stale/streets.json @@ -0,0 +1,14 @@ +{ + "bounds": [ -180, -85.0511, 180, 85.0511 ], + "center": [ 0, 0, 0 ], + "description": "", + "format": "pbf", + "id": "streets", + "maskLevel": 8, + "maxzoom": 15, + "minzoom": 0, + "name": "Streets", + "scheme": "xyz", + "tilejson": "2.0.0", + "tiles": [ "asset://test/fixtures/stale/{z}-{x}-{y}.vector.pbf" ] +} diff --git a/test/fixtures/stale/style.json b/test/fixtures/stale/style.json new file mode 100644 index 0000000000..ca86503d4f --- /dev/null +++ b/test/fixtures/stale/style.json @@ -0,0 +1,25 @@ +{ + "version": 8, + "name": "Water", + "sources": { + "mapbox": { + "type": "vector", + "url": "asset://test/fixtures/stale/streets.json" + } + }, + "layers": [{ + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + }, { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "blue" + } + }] +} |