Merge remote-tracking branch 'upstream/master' into esm_update

This commit is contained in:
acalcutt 2022-09-22 23:37:01 -04:00
commit 66669cfd77
2 changed files with 5 additions and 3 deletions

View file

@ -2,7 +2,7 @@
Deployment 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 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 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.

View file

@ -301,9 +301,11 @@ export const serve_rendered = {
}); });
if (z > 2 && tileMargin > 0) { 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({ image.extract({
left: tileMargin * scale, left: tileMargin * scale,
top: tileMargin * scale, top: (tileMargin + yoffset) * scale,
width: width * scale, width: width * scale,
height: height * scale height: height * scale
}); });