Skip to content

Commit 7701ade

Browse files
zmiaogithub-actions[bot]
authored andcommitted
Add a new render test for line symbol placement with text-anchor top
GitOrigin-RevId: f8c9b70c1d4c7d53e92472d31b1673d1cfa7b864
1 parent 7dca94f commit 7701ade

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
13.9 KB
Loading
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"height": 200,
6+
"width" : 500
7+
}
8+
},
9+
"center": [
10+
0.25,
11+
0.25
12+
],
13+
"zoom": 12,
14+
"bearing": -45,
15+
"sources": {
16+
"geojson": {
17+
"type": "geojson",
18+
"data": {
19+
"type": "LineString",
20+
"coordinates": [
21+
[
22+
0,
23+
0
24+
],
25+
[
26+
0.5,
27+
0.5
28+
]
29+
]
30+
}
31+
}
32+
},
33+
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
34+
"sprite": "local://sprites/sprite",
35+
"layers": [
36+
{
37+
"id": "background",
38+
"type": "background",
39+
"paint": {
40+
"background-color": "white"
41+
}
42+
},
43+
{
44+
"id": "translate",
45+
"type": "symbol",
46+
"source": "geojson",
47+
"layout": {
48+
"icon-image": "fav-airport-18",
49+
"text-rotation-alignment": "viewport",
50+
"text-field": "airport",
51+
"text-font": [
52+
"Open Sans Semibold",
53+
"Arial Unicode MS Bold"
54+
],
55+
"symbol-placement": "line",
56+
"symbol-spacing": 50,
57+
"text-anchor": "top"
58+
},
59+
"paint": {
60+
"icon-opacity": 1,
61+
"text-color": "hsl(0, 82%, 48%)",
62+
"text-translate": [0, 8]
63+
}
64+
}
65+
]
66+
}

0 commit comments

Comments
 (0)