From 9af3bff4f7a4bfd2786157443f012842fd8004a9 Mon Sep 17 00:00:00 2001 From: Ruben Poppe Date: Fri, 23 Sep 2022 03:50:10 +0200 Subject: [PATCH 1/2] update spelling (#594) --- docs/deployment.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/deployment.rst b/docs/deployment.rst index 3dff3ae..98aecb0 100644 --- a/docs/deployment.rst +++ b/docs/deployment.rst @@ -2,7 +2,7 @@ Deployment ========== -Typically - you should use nginx/lighttpd/apache on the frontend - and the tileserver-gl server is hidden behind it in production deployment. +Typically, you should use nginx, lighttpd or apache on the frontend. The tileserver-gl server is hidden behind it in production deployment. Caching ======= @@ -17,4 +17,4 @@ Nginx can be used to add protection via https, password, referrer, IP address re Running behind a proxy or a load-balancer ========================================= -If you need to run TileServer GL behind a proxy, make sure the proxy sends ``X-Forwarded-*`` headers to the server (most importantly ``X-Forwarded-Host`` and ``X-Forwarded-Proto``) to ensures the URLs generated inside TileJSON etc. are using the desired domain and protocol. +If you need to run TileServer GL behind a proxy, make sure the proxy sends ``X-Forwarded-*`` headers to the server (most importantly ``X-Forwarded-Host`` and ``X-Forwarded-Proto``) to ensure the URLs generated inside TileJSON, etc. are using the desired domain and protocol. From 161ac5ff84a627ec23e8183066b438fb835ca9bb Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 23 Sep 2022 05:22:06 +0200 Subject: [PATCH 2/2] Fix rendering with tileMargin on top and bottom border of map (#571) Co-authored-by: Frank Stolle --- src/serve_rendered.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/serve_rendered.js b/src/serve_rendered.js index 3a264fd..e39d8d5 100644 --- a/src/serve_rendered.js +++ b/src/serve_rendered.js @@ -305,9 +305,11 @@ module.exports = { }); if (z > 2 && tileMargin > 0) { + const [_, y] = mercator.px(params.center, z); + let yoffset = Math.max(Math.min(0, y - 128 - tileMargin), y + 128 + tileMargin - Math.pow(2, z + 8)); image.extract({ left: tileMargin * scale, - top: tileMargin * scale, + top: (tileMargin + yoffset) * scale, width: width * scale, height: height * scale });