tileserver-gl-light 5.5.0-pre.5 → 5.5.0-pre.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # tileserver-gl changelog
2
2
 
3
- ## 5.5.0-pre.5
3
+ ## 5.5.0-pre.6
4
4
  * Add S3 support for PMTiles with multiple AWS credential profiles (https://github.com/maptiler/tileserver-gl/pull/1779) by @acalcutt
5
5
  * Create .aws directory passthrough folder in Dockerfile (https://github.com/maptiler/tileserver-gl/pull/1784) by @acalcutt
6
6
  * Update eslint to v9 (https://github.com/maptiler/tileserver-gl/pull/1473) by @acalcutt
@@ -8,6 +8,9 @@
8
8
  * Add Visual Regression Tests for Static Image Overlays (https://github.com/maptiler/tileserver-gl/pull/1792) by @acalcutt
9
9
  * Fix S3 URL parsing for nested paths in AWS buckets (https://github.com/maptiler/tileserver-gl/pull/1819) by @acalcutt
10
10
  * Fix Renderer Crashes and Memory Leak (https://github.com/maptiler/tileserver-gl/pull/1825) by @acalcutt
11
+ * Fix loading local data sources (PMTiles/MBTiles) specified in style (https://github.com/maptiler/tileserver-gl/pull/1855) by @acalcutt
12
+ * **BREAKING**: Change 'sparse' option default based on tile format - vector tiles (pbf) default to false (204), raster tiles default to true (404 for overzoom) (https://github.com/maptiler/tileserver-gl/pull/1855) by @acalcutt
13
+ * Revert "fix(deps): bump maplibre-gl from 5.13.0 to 5.14.0 (https://github.com/maptiler/tileserver-gl/pull/1853)
11
14
 
12
15
  ## 5.4.0
13
16
  * 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
package/docs/config.rst CHANGED
@@ -249,7 +249,7 @@ The data source does not need to be specified here unless you explicitly want to
249
249
  Data Source Options
250
250
  --------------
251
251
 
252
- 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.
252
+ Within the top-level ``data`` object in your configuration, each defined data source (e.g., `terrain`, `vector_tiles`) can have several key properties. These properties define how *tileserver-gl* processes and serves the tiles from that source.
253
253
 
254
254
  For example::
255
255
 
@@ -257,12 +257,10 @@ For example::
257
257
  "terrain": {
258
258
  "mbtiles": "terrain1.mbtiles",
259
259
  "encoding": "mapbox",
260
- "tileSize": 512,
261
- "sparse": true
260
+ "tileSize": 512
262
261
  },
263
- "sparse_vector_tiles": {
264
- "pmtiles": "custom_osm.pmtiles",
265
- "sparse": true
262
+ "vector_tiles": {
263
+ "pmtiles": "custom_osm.pmtiles"
266
264
  },
267
265
  "production-s3-tiles": {
268
266
  "pmtiles": "s3://prod-bucket/tiles.pmtiles",
@@ -283,10 +281,13 @@ Here are the available options for each data source:
283
281
  Default: ``256``.
284
282
 
285
283
  ``sparse`` (boolean)
286
- Controls the HTTP status code returned by *tileserver-gl* when a requested tile is not found in the source.
287
- 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.
288
- 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.
289
- Default: ``false``.
284
+ Controls behavior when a tile is not found in the source.
285
+
286
+ * ``true`` - Returns HTTP 404, allowing clients like MapLibre to overzoom and use parent tiles. Use this for terrain or datasets with uneven zoom coverage.
287
+ * ``false`` - Returns HTTP 204 (No Content), signaling an intentionally empty tile and preventing overzoom.
288
+
289
+ This can be set globally in the top-level options or per-data-source (per-source overrides global).
290
+ Default: Depends on tile format - ``false`` for vector tiles (pbf), ``true`` for raster tiles (png, webp, jpg, etc.).
290
291
 
291
292
  ``s3Profile`` (string)
292
293
  Specifies the AWS credential profile to use for S3 PMTiles sources. The profile must be defined in your ``~/.aws/credentials`` file.
package/docs/usage.rst CHANGED
@@ -19,6 +19,7 @@ Getting started
19
19
  -p, --port <port> Port [8080] (default: 8080)
20
20
  -C|--no-cors Disable Cross-origin resource sharing headers
21
21
  -u|--public_url <url> Enable exposing the server on subpaths, not necessarily the root of the domain
22
+ --fetch-timeout <ms> Timeout in milliseconds for fetching remote tiles (default: 15000)
22
23
  -V, --verbose [level] More verbose output (level 1-3)
23
24
  -V, --verbose, -V 1, or --verbose 1: Important operations
24
25
  -V 2 or --verbose 2: Detailed operations
@@ -101,6 +102,26 @@ Default preview style and configuration
101
102
  - If no configuration file is specified, a default preview style (compatible with openmaptiles) is used.
102
103
  - If no data file is specified (and is not found in the current working directory), a sample file is downloaded (showing the Zurich area)
103
104
 
105
+ Remote tile fetching and timeouts
106
+ ======
107
+
108
+ TileServer GL can fetch tiles from remote HTTP/HTTPS sources referenced in your style. The ``--fetch-timeout`` option controls how long the server will wait for remote tile requests before giving up.
109
+
110
+ **Default behavior:**
111
+ - Default timeout is 15 seconds (15000 milliseconds)
112
+ - If a remote tile request exceeds this timeout, an error is logged and an empty tile is returned to the renderer
113
+
114
+ **Tuning the timeout:**
115
+
116
+ If you notice timeout errors with certain remote sources, you can adjust the timeout:
117
+ ::
118
+
119
+ # Increase timeout to 30 seconds for slower remote sources
120
+ tileserver-gl -c config.json --fetch-timeout 30000
121
+
122
+ # Reduce timeout to 5 seconds for faster failure
123
+ tileserver-gl -c config.json --fetch-timeout 5000
124
+
104
125
  Reloading the configuration
105
126
  ======
106
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileserver-gl-light",
3
- "version": "5.5.0-pre.5",
3
+ "version": "5.5.0-pre.7",
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",
@@ -35,24 +35,24 @@
35
35
  "docker": "docker build . && docker run --rm -i -p 8080:8080 $(docker build -q .)"
36
36
  },
37
37
  "dependencies": {
38
- "@aws-sdk/client-s3": "^3.935.0",
38
+ "@aws-sdk/client-s3": "^3.946.0",
39
39
  "@jsse/pbfont": "^0.3.0",
40
40
  "@mapbox/mapbox-gl-rtl-text": "0.3.0",
41
41
  "@mapbox/mbtiles": "0.12.1",
42
42
  "@mapbox/polyline": "^1.2.1",
43
43
  "@mapbox/sphericalmercator": "2.0.2",
44
44
  "@mapbox/vector-tile": "2.0.4",
45
- "@maplibre/maplibre-gl-inspect": "1.8.0",
45
+ "@maplibre/maplibre-gl-inspect": "1.8.1",
46
46
  "@maplibre/maplibre-gl-style-spec": "24.3.1",
47
47
  "@sindresorhus/fnv1a": "3.1.0",
48
48
  "advanced-pool": "0.3.3",
49
- "chokidar": "4.0.3",
49
+ "chokidar": "5.0.0",
50
50
  "clone": "2.1.2",
51
51
  "color": "5.0.3",
52
52
  "commander": "14.0.2",
53
53
  "copyfiles": "2.4.1",
54
54
  "cors": "2.8.5",
55
- "express": "5.1.0",
55
+ "express": "5.2.1",
56
56
  "handlebars": "4.7.8",
57
57
  "http-shutdown": "1.2.2",
58
58
  "leaflet": "1.9.4",
@@ -59,7 +59,7 @@
59
59
  function requireLodash_isequal () {
60
60
  if (hasRequiredLodash_isequal) return lodash_isequal.exports;
61
61
  hasRequiredLodash_isequal = 1;
62
- (function (module, exports) {
62
+ (function (module, exports$1) {
63
63
  /** Used as the size to enable large array optimizations. */
64
64
  var LARGE_ARRAY_SIZE = 200;
65
65
 
@@ -145,7 +145,7 @@
145
145
  var root = freeGlobal || freeSelf || Function('return this')();
146
146
 
147
147
  /** Detect free variable `exports`. */
148
- var freeExports = exports && !exports.nodeType && exports;
148
+ var freeExports = exports$1 && !exports$1.nodeType && exports$1;
149
149
 
150
150
  /** Detect free variable `module`. */
151
151
  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
@@ -2115,7 +2115,7 @@
2115
2115
  function requireRandomColor () {
2116
2116
  if (hasRequiredRandomColor) return randomColor$1.exports;
2117
2117
  hasRequiredRandomColor = 1;
2118
- (function (module, exports) {
2118
+ (function (module, exports$1) {
2119
2119
  (function(root, factory) {
2120
2120
 
2121
2121
  // Support CommonJS
@@ -2124,11 +2124,11 @@
2124
2124
 
2125
2125
  // Support NodeJS & Component, which allow module.exports to be a function
2126
2126
  if (module && module.exports) {
2127
- exports = module.exports = randomColor;
2127
+ exports$1 = module.exports = randomColor;
2128
2128
  }
2129
2129
 
2130
2130
  // Support CommonJS 1.1.1 spec
2131
- exports.randomColor = randomColor;
2131
+ exports$1.randomColor = randomColor;
2132
2132
 
2133
2133
  // Support AMD
2134
2134
  }
@@ -2860,18 +2860,18 @@
2860
2860
  this.sources[sourceId] = vectorLayerIds;
2861
2861
  }
2862
2862
  else {
2863
- throw new Error("Missing vectorlayersIds in source" + sourceId);
2863
+ throw new Error("Missing vector_layers in source: " + sourceId);
2864
2864
  }
2865
2865
  }
2866
2866
  catch (_b) {
2867
2867
  console.warn("Unable to retrieve tileJSON from " + style.sources[sourceId].url + " using style's layers");
2868
2868
  for (const layer of style.layers) {
2869
2869
  if ('source-layer' in layer && layer['source-layer']) {
2870
- const sourceId = layer['source-layer'];
2870
+ const layerId = layer['source-layer'];
2871
2871
  if (!this.sources[sourceId]) {
2872
2872
  this.sources[sourceId] = [];
2873
2873
  }
2874
- this.sources[sourceId].push(layer.id);
2874
+ this.sources[sourceId].push(layerId);
2875
2875
  }
2876
2876
  }
2877
2877
  }
@@ -2881,6 +2881,10 @@
2881
2881
  if (mapStyleSourcesNames.indexOf(sourceId) === -1) {
2882
2882
  delete this.sources[sourceId];
2883
2883
  }
2884
+ else {
2885
+ // uniqify the list of layer names
2886
+ this.sources[sourceId] = [...new Set(this.sources[sourceId])];
2887
+ }
2884
2888
  }
2885
2889
  });
2886
2890
  }