tileserver-gl-light 4.6.5 → 4.7.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/.eslintrc.cjs +4 -0
- package/.github/workflows/ct.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/README.md +2 -2
- package/docs/config.rst +20 -1
- package/docs/endpoints.rst +8 -8
- package/package.json +5 -5
- package/public/resources/images/marker-icon-2x.png +0 -0
- package/public/resources/images/marker-icon.png +0 -0
- package/public/resources/images/marker-shadow.png +0 -0
- package/public/resources/leaflet.css +6 -1
- package/public/resources/leaflet.js +3 -3
- package/public/resources/leaflet.js.map +1 -1
- package/public/resources/maplibre-gl-inspect.min.js +1 -1
- package/public/resources/maplibre-gl.js +4 -4
- package/public/resources/maplibre-gl.js.map +1 -1
- package/public/templates/data.tmpl +0 -1
- package/public/templates/index.tmpl +1 -4
- package/public/templates/viewer.tmpl +0 -1
- package/src/healthcheck.js +3 -3
- package/src/main.js +33 -19
- package/src/pmtiles_adapter.js +9 -9
- package/src/render.js +303 -0
- package/src/serve_data.js +12 -12
- package/src/serve_font.js +25 -44
- package/src/serve_rendered.js +263 -643
- package/src/serve_style.js +5 -17
- package/src/server.js +24 -29
- package/src/utils.js +22 -3
- package/test/setup.js +0 -1
- package/public/resources/L.TileLayer.NoGap.js +0 -243
package/.eslintrc.cjs
CHANGED
|
@@ -28,5 +28,9 @@ module.exports = {
|
|
|
28
28
|
rules: {
|
|
29
29
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
30
30
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
31
|
+
'@typescript-eslint/no-unused-vars': [
|
|
32
|
+
'warn',
|
|
33
|
+
{ argsIgnorePattern: 'next|err|info|reject' },
|
|
34
|
+
],
|
|
31
35
|
},
|
|
32
36
|
};
|
package/.github/workflows/ct.yml
CHANGED
package/README.md
CHANGED
|
@@ -28,8 +28,8 @@ docker build -t tileserver-gl-light .
|
|
|
28
28
|
[Download from OpenMapTiles.com](https://openmaptiles.com/downloads/planet/) or [create](https://github.com/openmaptiles/openmaptiles) your vector tile, and run following in directory contains your *.mbtiles.
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
docker run --rm -it -v $(pwd):/data -p
|
|
31
|
+
docker run --rm -it -v $(pwd):/data -p 8080:8080 tileserver-gl-light
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Documentation
|
|
35
|
-
You can read full documentation of this project at https://tileserver.readthedocs.io
|
|
35
|
+
You can read full documentation of this project at https://maptiler-tileserver.readthedocs.io/
|
package/docs/config.rst
CHANGED
|
@@ -132,6 +132,19 @@ If you have plenty of memory, try setting these equal to or slightly above your
|
|
|
132
132
|
If you need to conserve memory, try lower values for scale factors that are less common.
|
|
133
133
|
Default is ``[16, 8, 4]``.
|
|
134
134
|
|
|
135
|
+
``pbfAlias``
|
|
136
|
+
------------------------
|
|
137
|
+
|
|
138
|
+
Some CDNs did not handle .pbf extension as a static file correctly.
|
|
139
|
+
The default URLs (with .pbf) are always available, but an alternative can be set.
|
|
140
|
+
An example extension suffix would be ".pbf.pict".
|
|
141
|
+
|
|
142
|
+
``serveAllFonts``
|
|
143
|
+
------------------------
|
|
144
|
+
|
|
145
|
+
If this option is enabled, all the fonts from the ``paths.fonts`` will be served.
|
|
146
|
+
Otherwise only the fonts referenced by available styles will be served.
|
|
147
|
+
|
|
135
148
|
``serveAllStyles``
|
|
136
149
|
------------------------
|
|
137
150
|
|
|
@@ -139,10 +152,16 @@ If this option is enabled, all the styles from the ``paths.styles`` will be serv
|
|
|
139
152
|
The process will also watch for changes in this directory and remove/add more styles dynamically.
|
|
140
153
|
It is recommended to also use the ``serveAllFonts`` option when using this option.
|
|
141
154
|
|
|
155
|
+
``serveStaticMaps``
|
|
156
|
+
------------------------
|
|
157
|
+
|
|
158
|
+
If this option is enabled, all the static map endpoints will be served.
|
|
159
|
+
Default is ``true``.
|
|
160
|
+
|
|
142
161
|
``watermark``
|
|
143
162
|
-----------
|
|
144
163
|
|
|
145
|
-
Optional string to be rendered into the raster tiles
|
|
164
|
+
Optional string to be rendered into the raster tiles and static maps as watermark (bottom-left corner).
|
|
146
165
|
Not used by default.
|
|
147
166
|
|
|
148
167
|
``staticAttributionText``
|
package/docs/endpoints.rst
CHANGED
|
@@ -52,14 +52,14 @@ Static images
|
|
|
52
52
|
|
|
53
53
|
* can be provided multiple times
|
|
54
54
|
|
|
55
|
-
* ``latlng`` - indicates coordinates are in ``lat,lng`` order rather than the usual ``lng,lat``
|
|
56
|
-
* ``fill`` - color to use as the fill (e.g. ``red``, ``rgba(255,255,255,0.5)``, ``#0000ff``)
|
|
57
|
-
* ``stroke`` - color of the path stroke
|
|
58
|
-
* ``width`` - width of the stroke
|
|
59
|
-
* ``linecap`` - rendering style for the start and end points of
|
|
60
|
-
* ``linejoin`` - rendering style for
|
|
61
|
-
* ``border`` - color of the optional border
|
|
62
|
-
* ``borderwidth`` - width of the border stroke (default 10% of width)
|
|
55
|
+
* ``latlng`` - indicates coordinates are in ``lat,lng`` order rather than the usual ``lng,lat`` for paths and markers
|
|
56
|
+
* ``fill`` - default color to use as the fill (e.g. ``red``, ``rgba(255,255,255,0.5)``, ``#0000ff``) for all paths
|
|
57
|
+
* ``stroke`` - default color of the path stroke for all paths
|
|
58
|
+
* ``width`` - default width of the stroke for all paths
|
|
59
|
+
* ``linecap`` - rendering style for the start and end points of all paths - see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap
|
|
60
|
+
* ``linejoin`` - rendering style for joining successive segments of all paths when the direction changes - see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin
|
|
61
|
+
* ``border`` - color of the optional border stroke for all paths ; the border is like a halo around the stroke
|
|
62
|
+
* ``borderwidth`` - width of the border stroke (default 10% of stroke width) for all paths
|
|
63
63
|
* ``marker`` - Marker in format ``lng,lat|iconPath|option|option|...``
|
|
64
64
|
|
|
65
65
|
* Will be rendered with the bottom center at the provided location
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileserver-gl-light",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.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",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"test": "mocha test/**.js --timeout 10000",
|
|
9
|
+
"test": "mocha test/**.js --timeout 10000 --exit",
|
|
10
10
|
"lint:yml": "yamllint --schema=CORE_SCHEMA *.{yml,yaml}",
|
|
11
11
|
"lint:js": "npm run lint:eslint && npm run lint:prettier",
|
|
12
12
|
"lint:js:fix": "npm run lint:eslint:fix && npm run lint:prettier:fix",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"lint:eslint:fix": "eslint --fix \"{,!(node_modules|dist|static|public)/**/}*.{js,ts,cjs,mjs}\" --ignore-path .gitignore",
|
|
15
15
|
"lint:prettier": "prettier --check \"{,!(node_modules|dist|static|public)/**/}*.{js,ts,cjs,mjs,json}\" --ignore-path .gitignore",
|
|
16
16
|
"lint:prettier:fix": "prettier --write \"{,!(node_modules|dist|static|public)/**/}*.{js,ts,cjs,mjs,json}\" --ignore-path .gitignore",
|
|
17
|
-
"docker": "docker build
|
|
17
|
+
"docker": "docker build . && docker run --rm -i -p 8080:8080 $(docker build -q .)"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@mapbox/glyph-pbf-composite": "0.0.3",
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
"@mapbox/sphericalmercator": "1.2.0",
|
|
24
24
|
"@mapbox/vector-tile": "1.3.1",
|
|
25
25
|
"@maplibre/maplibre-gl-style-spec": "18.0.0",
|
|
26
|
-
"@sindresorhus/fnv1a": "3.
|
|
26
|
+
"@sindresorhus/fnv1a": "3.1.0",
|
|
27
27
|
"advanced-pool": "0.3.3",
|
|
28
|
+
"axios": "^1.6.2",
|
|
28
29
|
"chokidar": "3.5.3",
|
|
29
30
|
"clone": "2.1.2",
|
|
30
31
|
"color": "4.2.3",
|
|
@@ -37,7 +38,6 @@
|
|
|
37
38
|
"pbf": "3.2.1",
|
|
38
39
|
"pmtiles": "2.11.0",
|
|
39
40
|
"proj4": "2.9.2",
|
|
40
|
-
"request": "2.88.2",
|
|
41
41
|
"sanitize-filename": "1.6.3",
|
|
42
42
|
"tileserver-gl-styles": "2.0.0"
|
|
43
43
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -60,6 +60,11 @@
|
|
|
60
60
|
padding: 0;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
.leaflet-container img.leaflet-tile {
|
|
64
|
+
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
|
|
65
|
+
mix-blend-mode: plus-lighter;
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
.leaflet-container.leaflet-touch-zoom {
|
|
64
69
|
-ms-touch-action: pan-x pan-y;
|
|
65
70
|
touch-action: pan-x pan-y;
|
|
@@ -646,7 +651,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
646
651
|
}
|
|
647
652
|
|
|
648
653
|
/* Printing */
|
|
649
|
-
|
|
654
|
+
|
|
650
655
|
@media print {
|
|
651
656
|
/* Prevent printers from removing background-images of controls. */
|
|
652
657
|
.leaflet-control {
|