Merge branch 'master' into remove_ie_support

This commit is contained in:
Andrew Calcutt 2023-08-11 23:35:24 -04:00 committed by GitHub
commit b939daa35f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 575 additions and 442 deletions

View file

@ -26,12 +26,12 @@ jobs:
name: 'CI'
needs:
- extract-branch
uses: maptiler/tileserver-gl/.github/workflows/ci.yml@master
uses: ./.github/workflows/ci.yml
ct:
name: 'CT'
needs:
- extract-branch
uses: maptiler/tileserver-gl/.github/workflows/ct.yml@master
uses: ./.github/workflows/ct.yml
automerger:
name: 'Automerge Dependabot PRs'
needs:
@ -40,4 +40,4 @@ jobs:
- extract-branch
if: >
github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]'
uses: maptiler/tileserver-gl/.github/workflows/automerger.yml@master
uses: ./.github/workflows/automerger.yml

View file

@ -1,6 +1,7 @@
#!/bin/sh
if ! which -- "${1}"; then
# first arg is not an executable
if [ -e /tmp/.X99-lock ]; then rm /tmp/.X99-lock -f; fi
export DISPLAY=:99
Xvfb "${DISPLAY}" -nolisten unix &
exec node /usr/src/app/ "$@"

View file

@ -7,7 +7,7 @@ Typically, you should use nginx, lighttpd or apache on the frontend. The tileser
Caching
=======
There is a plenty of options you can use to create proper caching infrastructure: Varnish, CloudFlare, ...
There is a plenty of options you can use to create proper caching infrastructure: Varnish, Cloudflare, ...
Cloudflare Cache Rules
-----------

962
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "tileserver-gl",
"version": "4.4.8",
"version": "4.4.10",
"description": "Map tile server for JSON GL styles - vector and server side generated raster tiles",
"main": "src/main.js",
"bin": "src/main.js",
@ -20,44 +20,44 @@
"dependencies": {
"@mapbox/glyph-pbf-composite": "0.0.3",
"@mapbox/mbtiles": "0.12.1",
"@mapbox/polyline": "^1.1.1",
"@mapbox/polyline": "^1.2.0",
"@mapbox/sphericalmercator": "1.2.0",
"@mapbox/vector-tile": "1.3.1",
"@maplibre/maplibre-gl-native": "5.1.1",
"@maplibre/maplibre-gl-native": "5.2.0",
"@maplibre/maplibre-gl-style-spec": "18.0.0",
"advanced-pool": "0.3.3",
"canvas": "2.11.0",
"canvas": "2.11.2",
"chokidar": "3.5.3",
"clone": "2.1.2",
"color": "4.2.3",
"commander": "10.0.0",
"commander": "11.0.0",
"cors": "2.8.5",
"express": "4.18.2",
"handlebars": "4.7.7",
"handlebars": "4.7.8",
"http-shutdown": "1.2.2",
"morgan": "1.10.0",
"pbf": "3.2.1",
"proj4": "2.8.1",
"proj4": "2.9.0",
"request": "2.88.2",
"sanitize-filename": "1.6.3",
"sharp": "0.31.3",
"sharp": "0.32.4",
"tileserver-gl-styles": "2.0.0"
},
"devDependencies": {
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "4.3.7",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-jsdoc": "^40.0.1",
"eslint": "^8.47.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jsdoc": "^46.4.6",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-security": "^1.7.1",
"husky": "^8.0.3",
"lint-staged": "^13.1.2",
"lint-staged": "^13.2.3",
"mocha": "^10.2.0",
"prettier": "^2.8.4",
"prettier": "^2.8.8",
"should": "^13.2.3",
"supertest": "^6.3.3",
"yaml-lint": "^1.7.0"

View file

@ -780,8 +780,9 @@ export const serve_rendered = {
image.resize(width * scale, height * scale);
}
var composite_array = [];
if (opt_overlay) {
image.composite([{ input: opt_overlay }]);
composite_array.push({ input: opt_overlay });
}
if (item.watermark) {
const canvas = createCanvas(scale * width, scale * height);
@ -794,7 +795,11 @@ export const serve_rendered = {
ctx.fillStyle = 'rgba(0,0,0,.4)';
ctx.fillText(item.watermark, 5, height - 5);
image.composite([{ input: canvas.toBuffer() }]);
composite_array.push({ input: canvas.toBuffer() });
}
if (composite_array.length > 0) {
image.composite(composite_array);
}
const formatQuality = (options.formatQuality || {})[format];
@ -1374,6 +1379,9 @@ export const serve_rendered = {
type: 'baselayer',
};
const attributionOverride = params.tilejson && params.tilejson.attribution;
if (styleJSON.center && styleJSON.zoom) {
tileJSON.center = styleJSON.center.concat(Math.round(styleJSON.zoom));
}
Object.assign(tileJSON, params.tilejson || {});
tileJSON.tiles = params.domains || options.domains;
fixTileJSONCenter(tileJSON);