tileserver-gl 4.3.4 → 4.4.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.
@@ -55,3 +55,18 @@ jobs:
55
55
 
56
56
  - name: Run tests 🧪
57
57
  run: xvfb-run --server-args="-screen 0 1024x768x24" npm test
58
+
59
+ - name: Set up QEMU
60
+ uses: docker/setup-qemu-action@v2
61
+ with:
62
+ platforms: 'arm64'
63
+
64
+ - name: Set up Docker Buildx
65
+ uses: docker/setup-buildx-action@v2
66
+
67
+ - name: Test Docker Build
68
+ uses: docker/build-push-action@v3
69
+ with:
70
+ context: .
71
+ push: false
72
+ platforms: linux/arm64,linux/amd64
package/Dockerfile CHANGED
@@ -22,7 +22,7 @@ RUN set -ex; \
22
22
  librsvg2-dev \
23
23
  libcurl4-openssl-dev \
24
24
  libpixman-1-dev; \
25
- wget -qO- https://deb.nodesource.com/setup_16.x | bash; \
25
+ wget -qO- https://deb.nodesource.com/setup_18.x | bash; \
26
26
  apt-get install -y nodejs; \
27
27
  apt-get -y remove wget; \
28
28
  apt-get -y --purge autoremove; \
@@ -61,7 +61,7 @@ RUN set -ex; \
61
61
  libcurl4 \
62
62
  librsvg2-2 \
63
63
  libpango1.0; \
64
- wget -qO- https://deb.nodesource.com/setup_16.x | bash; \
64
+ wget -qO- https://deb.nodesource.com/setup_18.x | bash; \
65
65
  apt-get install -y nodejs; \
66
66
  apt-get -y remove wget; \
67
67
  apt-get -y --purge autoremove; \
package/Dockerfile_light CHANGED
@@ -13,7 +13,7 @@ RUN set -ex; \
13
13
  apt-get -y --no-install-recommends install \
14
14
  ca-certificates \
15
15
  wget; \
16
- wget -qO- https://deb.nodesource.com/setup_16.x | bash; \
16
+ wget -qO- https://deb.nodesource.com/setup_18.x | bash; \
17
17
  apt-get install -y nodejs; \
18
18
  apt-get -y remove wget; \
19
19
  apt-get -y --purge autoremove; \
package/Dockerfile_test CHANGED
@@ -27,7 +27,7 @@ RUN set -ex; \
27
27
  librsvg2-dev \
28
28
  libcurl4-openssl-dev \
29
29
  libpixman-1-dev; \
30
- wget -qO- https://deb.nodesource.com/setup_16.x | bash; \
30
+ wget -qO- https://deb.nodesource.com/setup_18.x | bash; \
31
31
  apt-get install -y nodejs; \
32
32
  apt-get clean;
33
33
 
package/README.md CHANGED
@@ -10,7 +10,7 @@ Vector and raster maps with GL styles. Server-side rendering by MapLibre GL Nati
10
10
  Download vector tiles from [OpenMapTiles](https://data.maptiler.com/downloads/planet/).
11
11
  ## Getting Started with Node
12
12
 
13
- Make sure you have Node.js version **14.20.0** or above installed. Node 16 is recommended. (running `node -v` it should output something like `v16.x.x`). Running without docker requires [Native dependencies](https://tileserver.readthedocs.io/en/latest/installation.html#npm) to be installed first.
13
+ Make sure you have Node.js version **14.20.0** or above installed. Node 18 is recommended. (running `node -v` it should output something like `v18.x.x`). Running without docker requires [Native dependencies](https://maptiler-tileserver.readthedocs.io/en/latest/installation.html#npm) to be installed first.
14
14
 
15
15
  Install `tileserver-gl` with server-side raster rendering of vector tiles with npm.
16
16
 
@@ -81,7 +81,7 @@ xvfb-run --server-args="-screen 0 1024x768x24" node .
81
81
 
82
82
  ## Documentation
83
83
 
84
- You can read the full documentation of this project at https://tileserver.readthedocs.io/.
84
+ You can read the full documentation of this project at https://maptiler-tileserver.readthedocs.io/.
85
85
 
86
86
  ## Alternative
87
87
 
@@ -60,7 +60,7 @@ Alternatively, you can use ``tileserver-gl-light`` package instead, which is pur
60
60
  From source
61
61
  ===========
62
62
 
63
- Make sure you have Node v10 (nvm install 10) and run::
63
+ Make sure you have Node v18 (nvm install 18) and run::
64
64
 
65
65
  npm install
66
66
  node .
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileserver-gl",
3
- "version": "4.3.4",
3
+ "version": "4.4.0",
4
4
  "description": "Map tile server for JSON GL styles - vector and server side generated raster tiles",
5
5
  "main": "src/main.js",
6
6
  "bin": "src/main.js",
@@ -43,8 +43,8 @@
43
43
  "sanitize-filename": "1.6.3"
44
44
  },
45
45
  "devDependencies": {
46
- "@commitlint/cli": "^17.3.0",
47
- "@commitlint/config-conventional": "^17.3.0",
46
+ "@commitlint/cli": "^17.4.0",
47
+ "@commitlint/config-conventional": "^17.4.0",
48
48
  "@typescript-eslint/eslint-plugin": "^5.48.0",
49
49
  "@typescript-eslint/parser": "^5.48.0",
50
50
  "chai": "4.3.7",
@@ -53,7 +53,7 @@
53
53
  "eslint-plugin-jsdoc": "^39.6.4",
54
54
  "eslint-plugin-prettier": "^4.2.1",
55
55
  "eslint-plugin-security": "^1.5.0",
56
- "husky": "^8.0.1",
56
+ "husky": "^8.0.3",
57
57
  "lint-staged": "^13.1.0",
58
58
  "mocha": "^10.2.0",
59
59
  "prettier": "^2.8.1",
@@ -69,7 +69,7 @@
69
69
  ],
70
70
  "license": "BSD-2-Clause",
71
71
  "engines": {
72
- "node": ">=14.15.0 <17"
72
+ "node": ">=14.20.0 <19"
73
73
  },
74
74
  "repository": {
75
75
  "url": "git+https://github.com/maptiler/tileserver-gl.git",
@@ -615,6 +615,7 @@ export const serve_rendered = {
615
615
  ) {
616
616
  return res.status(400).send('Invalid center');
617
617
  }
618
+
618
619
  if (
619
620
  Math.min(width, height) <= 0 ||
620
621
  Math.max(width, height) * scale > (options.maxSize || 2048) ||
@@ -623,6 +624,7 @@ export const serve_rendered = {
623
624
  ) {
624
625
  return res.status(400).send('Invalid size');
625
626
  }
627
+
626
628
  if (format === 'png' || format === 'webp') {
627
629
  } else if (format === 'jpg' || format === 'jpeg') {
628
630
  format = 'jpeg';
@@ -630,8 +632,9 @@ export const serve_rendered = {
630
632
  return res.status(400).send('Invalid format');
631
633
  }
632
634
 
635
+ const tileMargin = Math.max(options.tileMargin || 0, 0);
633
636
  let pool;
634
- if (opt_mode === 'tile') {
637
+ if (opt_mode === 'tile' && tileMargin === 0) {
635
638
  pool = item.map.renderers[scale];
636
639
  } else {
637
640
  pool = item.map.renderers_static[scale];
@@ -646,12 +649,12 @@ export const serve_rendered = {
646
649
  width: width,
647
650
  height: height,
648
651
  };
652
+
649
653
  if (z === 0) {
650
654
  params.width *= 2;
651
655
  params.height *= 2;
652
656
  }
653
657
 
654
- const tileMargin = Math.max(options.tileMargin || 0, 0);
655
658
  if (z > 2 && tileMargin > 0) {
656
659
  params.width += tileMargin * 2;
657
660
  params.height += tileMargin * 2;