Skip to content

Commit 7a63e01

Browse files
woodroofgithub-actions[bot]
authored andcommitted
Tests for appearance images in imported styles
GitOrigin-RevId: 5f89097c8be1cd4a4f21aa5fd1916859bc0cdb00
1 parent c6f742f commit 7a63e01

4 files changed

Lines changed: 127 additions & 0 deletions

File tree

4.67 KB
Loading
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"allowed": 0.00074,
6+
"pixelRatio": 2,
7+
"height": 64,
8+
"width": 64
9+
}
10+
},
11+
"camera": {"camera-projection": "orthographic"},
12+
"imports": [
13+
{
14+
"id": "basemap",
15+
"url": "",
16+
"data": {
17+
"version": 8,
18+
"sources": {
19+
"geojson": {
20+
"type": "geojson",
21+
"data": {
22+
"type": "FeatureCollection",
23+
"features": [
24+
{
25+
"type": "Feature",
26+
"properties": {
27+
"image": "bank-12"
28+
},
29+
"geometry": {
30+
"type": "Point",
31+
"coordinates": [
32+
0,
33+
0
34+
]
35+
}
36+
}
37+
]
38+
}
39+
}
40+
},
41+
"sprite": "local://sprites/sprite",
42+
"layers": [
43+
{
44+
"id": "icon",
45+
"type": "symbol",
46+
"source": "geojson",
47+
"layout": {
48+
"icon-image": "bakery-12",
49+
"icon-size": 1,
50+
"icon-rotate": 0,
51+
"icon-offset": [0, 0]
52+
},
53+
"appearances": [
54+
{
55+
"name": "test",
56+
"condition": true,
57+
"properties": {
58+
"icon-size": 2,
59+
"icon-rotate": 90,
60+
"icon-offset": [10, 10]
61+
}
62+
}
63+
]
64+
}
65+
]
66+
}
67+
}
68+
],
69+
"layers": []
70+
}
1.48 KB
Loading
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"allowed": 0.00074,
6+
"width": 64,
7+
"height": 64,
8+
"description": "Test that appearance-based icons work when icon-image is not present in layout properties"
9+
}
10+
},
11+
"imports": [
12+
{
13+
"id": "basemap",
14+
"url": "",
15+
"data": {
16+
"sources": {
17+
"geojson": {
18+
"type": "geojson",
19+
"data": {
20+
"type": "Point",
21+
"coordinates": [0, 0]
22+
}
23+
}
24+
},
25+
"sprite": "local://sprites/sprite",
26+
"layers": [
27+
{
28+
"id": "background",
29+
"type": "background",
30+
"paint": {
31+
"background-color": "rgba(255, 255, 255, 1)"
32+
}
33+
},
34+
{
35+
"id": "icon-only-appearance",
36+
"type": "symbol",
37+
"source": "geojson",
38+
"layout": {},
39+
"appearances": [
40+
{
41+
"name": "show-icon",
42+
"condition": true,
43+
"properties": {
44+
"icon-image": "bank-12",
45+
"icon-size": 2,
46+
"icon-rotate": 90,
47+
"icon-offset": [10, 10]
48+
}
49+
}
50+
]
51+
}
52+
]
53+
}
54+
}
55+
],
56+
"layers": []
57+
}

0 commit comments

Comments
 (0)