tileserver-gl-light 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
@@ -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
 
@@ -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-light",
3
- "version": "4.3.4",
3
+ "version": "4.4.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",
@@ -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;