tileserver-gl-light 5.3.1 → 5.4.0-pre.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/CHANGELOG.md +8 -3
- package/docs/config.rst +30 -7
- package/package.json +9 -9
- package/public/resources/maplibre-gl.js +4 -4
- package/public/resources/maplibre-gl.js.map +1 -1
- package/src/serve_data.js +20 -32
- package/src/serve_rendered.js +67 -1
- package/src/server.js +69 -12
- package/src/utils.js +9 -2
- package/test/style.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# tileserver-gl changelog
|
|
2
2
|
|
|
3
|
-
## 5.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
## 5.4.0-pre.1
|
|
4
|
+
* Fix the issue where the tile URL cannot be correctly parsed with the HTTPS protocol when using an nginx proxy service (https://github.com/maptiler/tileserver-gl/pull/1578) by @dakanggo
|
|
5
|
+
* Use jemalloc as memory allocator in the docker image (https://github.com/maptiler/tileserver-gl/pull/1574) by @MichielMortier
|
|
6
|
+
* Rasters: Add tileSize to TileJSON (https://github.com/maptiler/tileserver-gl/pull/1559) by @roblabs
|
|
7
|
+
* Allow a 'sparse' option per data source (https://github.com/maptiler/tileserver-gl/pull/1558) by @acalcutt
|
|
8
|
+
* Updates Maplibre-gl-js to v5.6.0 and adds color-relief support (note: this is not yet supported by maplibre-native) (https://github.com/maptiler/tileserver-gl/pull/1591)
|
|
9
|
+
* Fix getPublicUrl to handle relative and absolute URLs (https://github.com/maptiler/tileserver-gl/pull/1472) by @Monnte
|
|
10
|
+
* Workaround for 'hillshade-method' not yet being suported in maplibre-native (https://github.com/maptiler/tileserver-gl/pull/1620) by @acalcutt
|
|
6
11
|
|
|
7
12
|
## 5.3.0
|
|
8
13
|
* Fix - Include public\resources js files on npm publish by specifying included files in package.json (https://github.com/maptiler/tileserver-gl/pull/1490) by @acalcutt
|
package/docs/config.rst
CHANGED
|
@@ -243,24 +243,47 @@ For example::
|
|
|
243
243
|
|
|
244
244
|
The data source does not need to be specified here unless you explicitly want to serve the raw data.
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
Data Source Options
|
|
247
247
|
--------------
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
Within the top-level ``data`` object in your configuration, each defined data source (e.g., `terrain`, `sparse_vector_tiles`) can have several key properties. These properties define how *tileserver-gl* processes and serves the tiles from that source.
|
|
250
250
|
|
|
251
251
|
For example::
|
|
252
252
|
|
|
253
253
|
"data": {
|
|
254
|
-
"
|
|
254
|
+
"terrain": {
|
|
255
255
|
"mbtiles": "terrain1.mbtiles",
|
|
256
|
-
"encoding": "mapbox"
|
|
256
|
+
"encoding": "mapbox",
|
|
257
|
+
"tileSize": 512,
|
|
258
|
+
"sparse": true
|
|
257
259
|
},
|
|
258
|
-
"
|
|
259
|
-
"pmtiles": "
|
|
260
|
-
"
|
|
260
|
+
"sparse_vector_tiles": {
|
|
261
|
+
"pmtiles": "custom_osm.pmtiles",
|
|
262
|
+
"sparse": true
|
|
261
263
|
}
|
|
262
264
|
}
|
|
263
265
|
|
|
266
|
+
Here are the available options for each data source:
|
|
267
|
+
|
|
268
|
+
``encoding`` (string)
|
|
269
|
+
Applicable to terrain tiles. Configures the expected encoding of the terrain data.
|
|
270
|
+
Setting this to ``mapbox`` or ``terrarium`` enables a terrain preview mode and the ``elevation`` API for the ``data`` endpoint (if applicable to the source).
|
|
271
|
+
|
|
272
|
+
``tileSize`` (integer)
|
|
273
|
+
Specifies the expected pixel dimensions of the tiles within this data source.
|
|
274
|
+
This option is crucial if your source data uses 512x512 pixel tiles, as *tileserver-gl* typically assumes 256x256 by default.
|
|
275
|
+
Allowed values: ``256``, ``512``.
|
|
276
|
+
Default: ``256``.
|
|
277
|
+
|
|
278
|
+
``sparse`` (boolean)
|
|
279
|
+
Controls the HTTP status code returned by *tileserver-gl* when a requested tile is not found in the source.
|
|
280
|
+
When ``true``, a ``410 Gone`` status is returned for missing tiles. This behaviour is beneficial for clients like MapLibre-GL-JS or MapLibre-Native, as it signals them to attempt loading tiles from lower zoom levels (overzooming) when a higher-zoom tile is explicitly missing.
|
|
281
|
+
When ``false`` (default), *tileserver-gl* returns a ``204 No Content`` for missing tiles, which typically signals the client to stop trying to load a substitute.
|
|
282
|
+
Default: ``false``.
|
|
283
|
+
|
|
284
|
+
.. note::
|
|
285
|
+
These configuration options will be overridden by metadata in the MBTiles or PMTiles file. if corresponding properties exist in the file's metadata, you do not need to specify them in the data configuration.
|
|
286
|
+
|
|
264
287
|
Referencing local files from style JSON
|
|
265
288
|
=======================================
|
|
266
289
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileserver-gl-light",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0-pre.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",
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"docker": "docker build . && docker run --rm -i -p 8080:8080 $(docker build -q .)"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@jsse/pbfont": "^0.2.
|
|
37
|
+
"@jsse/pbfont": "^0.2.8",
|
|
38
38
|
"@mapbox/mapbox-gl-rtl-text": "0.3.0",
|
|
39
39
|
"@mapbox/mbtiles": "0.12.1",
|
|
40
40
|
"@mapbox/polyline": "^1.2.1",
|
|
41
41
|
"@mapbox/sphericalmercator": "2.0.1",
|
|
42
|
-
"@mapbox/vector-tile": "2.0.
|
|
42
|
+
"@mapbox/vector-tile": "2.0.4",
|
|
43
43
|
"@maplibre/maplibre-gl-inspect": "1.7.1",
|
|
44
|
-
"@maplibre/maplibre-gl-style-spec": "23.
|
|
44
|
+
"@maplibre/maplibre-gl-style-spec": "23.3.0",
|
|
45
45
|
"@sindresorhus/fnv1a": "3.1.0",
|
|
46
46
|
"advanced-pool": "0.3.3",
|
|
47
|
-
"axios": "^1.
|
|
47
|
+
"axios": "^1.10.0",
|
|
48
48
|
"chokidar": "4.0.3",
|
|
49
49
|
"clone": "2.1.2",
|
|
50
50
|
"color": "5.0.0",
|
|
51
|
-
"commander": "
|
|
51
|
+
"commander": "14.0.0",
|
|
52
52
|
"copyfiles": "2.4.1",
|
|
53
53
|
"cors": "2.8.5",
|
|
54
54
|
"express": "5.1.0",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"http-shutdown": "1.2.2",
|
|
57
57
|
"leaflet": "1.9.4",
|
|
58
58
|
"leaflet-hash": "0.2.1",
|
|
59
|
-
"maplibre-gl": "5.
|
|
59
|
+
"maplibre-gl": "5.6.0",
|
|
60
60
|
"morgan": "1.10.0",
|
|
61
61
|
"pbf": "4.0.1",
|
|
62
62
|
"pmtiles": "4.3.0",
|
|
63
|
-
"proj4": "2.
|
|
63
|
+
"proj4": "2.19.4",
|
|
64
64
|
"sanitize-filename": "1.6.3",
|
|
65
|
-
"semver": "^7.
|
|
65
|
+
"semver": "^7.7.2",
|
|
66
66
|
"tileserver-gl-styles": "2.0.0"
|
|
67
67
|
},
|
|
68
68
|
"keywords": [
|