Skip to content

Commit 090c66a

Browse files
global-state expression support in filter and paint properties (#5613)
* add global-state expression support * set global state on style load * use forked spec * temporarily build in prepare step * temporary build fix * fix unit tests * test setGlobalState * add setGlobalStateProperty * add getGlobalState * jsdoc * update to support schema * validate style fixes * use exported types * remove validation * cleanout * update filter evaluation in all layer types * cleanout * use style spec fork, fix worker transfer * cleanout * tests & fixes * fixes + example * minor fixes * update CHANGELOG * review fixes * review fixes * fix tests * add global state diff * include optional sharp dependencies * full diff implementation, example fixes * fix spellcheck * update bundle size test * review fixes * review fix * review fixes * fix types * update tests * use latest spec * _setGlobalState -> setGlobalState * more tests * ensure 100% coverage for new style methods
1 parent aba4196 commit 090c66a

30 files changed

+4158
-1841
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## main
22

33
### ✨ Features and improvements
4-
4+
- Add `setGlobalStateProperty()` and `getGlobalState()` to the map public API ([#5613](https://github.com/maplibre/maplibre-gl-js/pull/5613))
55
- _...Add new stuff here..._
66

77
### 🐞 Bug fixes
80.7 KB
Loading
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"type": "FeatureCollection",
3+
"features": [
4+
{
5+
"type": "Feature",
6+
"properties": {
7+
"name": "Funivia Pani d\"Erna",
8+
"type": "lift"
9+
},
10+
"geometry": {
11+
"coordinates": [
12+
9.428832133068624,
13+
45.86316915700536
14+
],
15+
"type": "Point"
16+
}
17+
},
18+
{
19+
"type": "Feature",
20+
"properties": {
21+
"name": "Funicolare Como-Brunate",
22+
"type": "railway"
23+
},
24+
"geometry": {
25+
"coordinates": [
26+
9.082724408221196,
27+
45.8175517969448
28+
],
29+
"type": "Point"
30+
},
31+
"id": 1
32+
},
33+
{
34+
"type": "Feature",
35+
"properties": {
36+
"name": "Funivia Pigra Argegno",
37+
"type": "lift"
38+
},
39+
"geometry": {
40+
"coordinates": [
41+
9.129994484478942,
42+
45.94660892078414
43+
],
44+
"type": "Point"
45+
}
46+
},
47+
{
48+
"type": "Feature",
49+
"properties": {
50+
"name": "Funicolare Sacro Monte",
51+
"type": "railway"
52+
},
53+
"geometry": {
54+
"coordinates": [
55+
8.787919643563527,
56+
45.85848217923672
57+
],
58+
"type": "Point"
59+
}
60+
},
61+
{
62+
"type": "Feature",
63+
"properties": {
64+
"name": "Funicolare Cassarate Monte Brè",
65+
"type": "railway"
66+
},
67+
"geometry": {
68+
"coordinates": [
69+
8.970232317680455,
70+
46.00646782864027
71+
],
72+
"type": "Point"
73+
}
74+
},
75+
{
76+
"type": "Feature",
77+
"properties": {
78+
"name": "Funicolare Monte San Salvatore"
79+
},
80+
"geometry": {
81+
"coordinates": [
82+
8.945347867434748,
83+
45.990386744943265
84+
],
85+
"type": "Point"
86+
}
87+
},
88+
{
89+
"type": "Feature",
90+
"properties": {
91+
"name": "Funivia Monte Lema",
92+
"type": "lift"
93+
},
94+
"geometry": {
95+
"coordinates": [
96+
8.856229999561407,
97+
46.0237566800011
98+
],
99+
"type": "Point"
100+
}
101+
}
102+
]
103+
}

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ Note too that if the CSS isn't available by the first render, as soon as the CSS
9494
MapLibre GL JS is also distributed via UNPKG. Our latest version can installed by adding below tags this in the html `<head>`. Further instructions on how to select specific versions and semver ranges can be found on at [unpkg.com](https://unpkg.com).
9595

9696
```html
97-
<script src="https://unpkg.com/maplibre-gl@^5.4.0/dist/maplibre-gl.js"></script>
98-
<link href="https://unpkg.com/maplibre-gl@^5.4.0/dist/maplibre-gl.css" rel="stylesheet" />
97+
<script src="https://unpkg.com/maplibre-gl@^5.5.0/dist/maplibre-gl.js"></script>
98+
<link href="https://unpkg.com/maplibre-gl@^5.5.0/dist/maplibre-gl.css" rel="stylesheet" />
9999
```

0 commit comments

Comments
 (0)