tileserver-gl-light 4.12.0 → 4.13.1
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/docs/config.rst +22 -5
- package/package.json +8 -8
- package/public/resources/index.css +21 -4
- 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 +52 -57
- package/src/mbtiles_wrapper.js +46 -0
- package/src/promises.js +14 -0
- package/src/serve_data.js +26 -40
- package/src/serve_rendered.js +69 -68
- package/src/serve_style.js +1 -1
- package/src/utils.js +3 -2
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.1",
|
|
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,15 +17,15 @@
|
|
|
17
17
|
"docker": "docker build . && docker run --rm -i -p 8080:8080 $(docker build -q .)"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@jsse/pbfont": "^0.
|
|
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.3.
|
|
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.7.
|
|
28
|
+
"axios": "^1.7.6",
|
|
29
29
|
"chokidar": "3.6.0",
|
|
30
30
|
"clone": "2.1.2",
|
|
31
31
|
"color": "4.2.3",
|
|
@@ -35,9 +35,9 @@
|
|
|
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
|
}
|