tileserver-gl-light 4.11.1 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ct.yml +1 -1
- package/.github/workflows/release.yml +2 -2
- package/docs/config.rst +22 -5
- package/package.json +9 -9
- package/public/resources/index.css +21 -4
- package/public/resources/maplibre-gl-inspect.js +3 -2
- package/public/resources/maplibre-gl-inspect.js.map +1 -1
- package/public/resources/maplibre-gl.css +1 -1
- package/public/resources/maplibre-gl.js +4 -4
- package/public/resources/maplibre-gl.js.map +1 -1
- package/public/templates/index.tmpl +24 -2
- package/src/main.js +10 -8
- package/src/promises.js +14 -0
- package/src/serve_data.js +10 -10
- package/src/serve_rendered.js +30 -11
- package/src/serve_style.js +1 -1
- package/src/utils.js +6 -5
package/.github/workflows/ct.yml
CHANGED
|
@@ -80,7 +80,7 @@ jobs:
|
|
|
80
80
|
password: ${{ github.event.inputs.docker_token }}
|
|
81
81
|
|
|
82
82
|
- name: Build and publish Full Version to Docker Hub
|
|
83
|
-
uses: docker/build-push-action@
|
|
83
|
+
uses: docker/build-push-action@v6
|
|
84
84
|
with:
|
|
85
85
|
context: .
|
|
86
86
|
push: true
|
|
@@ -106,7 +106,7 @@ jobs:
|
|
|
106
106
|
NPM_TOKEN: ${{ github.event.inputs.npm_token }}
|
|
107
107
|
|
|
108
108
|
- name: Build and publish Light Version to Docker Hub
|
|
109
|
-
uses: docker/build-push-action@
|
|
109
|
+
uses: docker/build-push-action@v6
|
|
110
110
|
with:
|
|
111
111
|
context: ./light
|
|
112
112
|
file: ./light/Dockerfile
|
package/docs/config.rst
CHANGED
|
@@ -23,9 +23,13 @@ Example:
|
|
|
23
23
|
"localhost:8080",
|
|
24
24
|
"127.0.0.1:8080"
|
|
25
25
|
],
|
|
26
|
-
"
|
|
27
|
-
"jpeg":
|
|
28
|
-
|
|
26
|
+
"formatOptions": {
|
|
27
|
+
"jpeg": {
|
|
28
|
+
"quality": 80
|
|
29
|
+
},
|
|
30
|
+
"webp": {
|
|
31
|
+
"quality": 90
|
|
32
|
+
}
|
|
29
33
|
},
|
|
30
34
|
"maxScaleFactor": 3,
|
|
31
35
|
"maxSize": 2048,
|
|
@@ -85,10 +89,23 @@ Path to the html (relative to ``root`` path) to use as a front page.
|
|
|
85
89
|
Use ``true`` (or nothing) to serve the default TileServer GL front page with list of styles and data.
|
|
86
90
|
Use ``false`` to disable the front page altogether (404).
|
|
87
91
|
|
|
88
|
-
``
|
|
92
|
+
``formatOptions``
|
|
89
93
|
-----------------
|
|
90
94
|
|
|
91
|
-
|
|
95
|
+
You can use this to specify options for the generation of images in the supported file formats.
|
|
96
|
+
For JPEG and WebP, the only supported option is ``quality`` [0-100].
|
|
97
|
+
For PNG, the full set of options `exposed by the sharp library <https://sharp.pixelplumbing.com/api-output#png>`_ is available, except ``force`` and ``colours`` (use ``colors``). If not set, their values are the defaults from ``sharp``.
|
|
98
|
+
|
|
99
|
+
For example::
|
|
100
|
+
|
|
101
|
+
"formatOptions": {
|
|
102
|
+
"png": {
|
|
103
|
+
"palette": true,
|
|
104
|
+
"colors": 4
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
Note: ``formatOptions`` replaced the ``formatQuality`` option in previous versions of TileServer GL.
|
|
92
109
|
|
|
93
110
|
``maxScaleFactor``
|
|
94
111
|
-----------
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileserver-gl-light",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0",
|
|
4
4
|
"description": "Map tile server for JSON GL styles - serving vector tiles",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"bin": "src/main.js",
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
"docker": "docker build . && docker run --rm -i -p 8080:8080 $(docker build -q .)"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@
|
|
20
|
+
"@jsse/pbfont": "^0.2.2",
|
|
21
21
|
"@mapbox/mbtiles": "0.12.1",
|
|
22
22
|
"@mapbox/polyline": "^1.2.1",
|
|
23
23
|
"@mapbox/sphericalmercator": "1.2.0",
|
|
24
|
-
"@mapbox/vector-tile": "
|
|
25
|
-
"@maplibre/maplibre-gl-style-spec": "20.
|
|
24
|
+
"@mapbox/vector-tile": "2.0.3",
|
|
25
|
+
"@maplibre/maplibre-gl-style-spec": "20.3.1",
|
|
26
26
|
"@sindresorhus/fnv1a": "3.1.0",
|
|
27
27
|
"advanced-pool": "0.3.3",
|
|
28
|
-
"axios": "^1.
|
|
28
|
+
"axios": "^1.7.5",
|
|
29
29
|
"chokidar": "3.6.0",
|
|
30
30
|
"clone": "2.1.2",
|
|
31
31
|
"color": "4.2.3",
|
|
32
|
-
"commander": "12.
|
|
32
|
+
"commander": "12.1.0",
|
|
33
33
|
"cors": "2.8.5",
|
|
34
34
|
"express": "4.19.2",
|
|
35
35
|
"handlebars": "4.7.8",
|
|
36
36
|
"http-shutdown": "1.2.2",
|
|
37
37
|
"morgan": "1.10.0",
|
|
38
|
-
"pbf": "
|
|
39
|
-
"pmtiles": "3.0.
|
|
40
|
-
"proj4": "2.
|
|
38
|
+
"pbf": "4.0.1",
|
|
39
|
+
"pmtiles": "3.0.7",
|
|
40
|
+
"proj4": "2.12.0",
|
|
41
41
|
"sanitize-filename": "1.6.3",
|
|
42
42
|
"tileserver-gl-styles": "2.0.0"
|
|
43
43
|
},
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'OpenSans';
|
|
3
|
-
src: url('
|
|
3
|
+
src: url('./fonts/OpenSans-Regular.ttf');
|
|
4
4
|
font-weight: normal;
|
|
5
5
|
font-style: normal;
|
|
6
6
|
}
|
|
7
7
|
@font-face {
|
|
8
8
|
font-family: 'OpenSans';
|
|
9
|
-
src: url('
|
|
9
|
+
src: url('./fonts/OpenSans-Italic.ttf');
|
|
10
10
|
font-weight: normal;
|
|
11
11
|
font-style: italic;
|
|
12
12
|
}
|
|
13
13
|
@font-face {
|
|
14
14
|
font-family: 'OpenSans';
|
|
15
|
-
src: url('
|
|
15
|
+
src: url('./fonts/OpenSans-Bold.ttf');
|
|
16
16
|
font-weight: bold;
|
|
17
17
|
font-style: normal;
|
|
18
18
|
}
|
|
@@ -25,7 +25,7 @@ body {
|
|
|
25
25
|
margin: 0;
|
|
26
26
|
background-repeat: no-repeat !important;
|
|
27
27
|
background-size: contain !important;
|
|
28
|
-
background-image: url(
|
|
28
|
+
background-image: url(./images/header-map-1280px.png);
|
|
29
29
|
}
|
|
30
30
|
a {
|
|
31
31
|
color: #499dce;
|
|
@@ -73,12 +73,29 @@ section {
|
|
|
73
73
|
font-size: 20px;
|
|
74
74
|
background: #fff;
|
|
75
75
|
}
|
|
76
|
+
.filter-details {
|
|
77
|
+
padding: 20px 30px;
|
|
78
|
+
}
|
|
79
|
+
.box input { /* Filter text input */
|
|
80
|
+
padding: 10px;
|
|
81
|
+
font-size: 16px;
|
|
82
|
+
border: 1px solid #ededed;
|
|
83
|
+
border-radius: 4px;
|
|
84
|
+
/* fill out to parent */
|
|
85
|
+
width: 100%;
|
|
86
|
+
}
|
|
76
87
|
.item {
|
|
77
88
|
background: #fff;
|
|
78
89
|
height: 191px;
|
|
79
90
|
border: 1px solid #ededed;
|
|
80
91
|
border-top: none;
|
|
81
92
|
}
|
|
93
|
+
.filter-item {
|
|
94
|
+
background: #fbfbfb;
|
|
95
|
+
height: 150px;
|
|
96
|
+
border: 1px solid #ededed;
|
|
97
|
+
border-top: none;
|
|
98
|
+
}
|
|
82
99
|
.item:nth-child(odd) {
|
|
83
100
|
background-color: #fbfbfb;
|
|
84
101
|
}
|
|
@@ -849,7 +849,7 @@
|
|
|
849
849
|
length = result.length;
|
|
850
850
|
|
|
851
851
|
for (var key in value) {
|
|
852
|
-
if ((
|
|
852
|
+
if ((hasOwnProperty.call(value, key)) &&
|
|
853
853
|
!(skipIndexes && (
|
|
854
854
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
855
855
|
key == 'length' ||
|
|
@@ -2055,9 +2055,10 @@
|
|
|
2055
2055
|
}
|
|
2056
2056
|
function renderProperties(feature) {
|
|
2057
2057
|
const sourceProperty = renderLayer(feature.layer['source-layer'] || feature.layer.source);
|
|
2058
|
+
const idProperty = renderProperty('$id', feature.id);
|
|
2058
2059
|
const typeProperty = renderProperty('$type', feature.geometry.type);
|
|
2059
2060
|
const properties = Object.keys(feature.properties).map(propertyName => renderProperty(propertyName, feature.properties[propertyName]));
|
|
2060
|
-
return [sourceProperty, typeProperty].concat(properties).join('');
|
|
2061
|
+
return [sourceProperty, idProperty, typeProperty].concat(properties).join('');
|
|
2061
2062
|
}
|
|
2062
2063
|
function renderFeatures(features) {
|
|
2063
2064
|
return features.map(ft => `<div class="maplibregl-inspect_feature">${renderProperties(ft)}</div>`).join('');
|