tileserver-gl 5.7.0-pre.1 → 5.7.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.
- package/CHANGELOG.md +4 -1
- package/package.json +9 -9
- package/public/resources/elevation-control.js +8 -4
- package/public/resources/maplibre-gl-inspect.mjs +2286 -0
- package/public/resources/maplibre-gl-inspect.mjs.map +1 -0
- package/public/resources/maplibre-gl-shared.mjs +6 -0
- package/public/resources/maplibre-gl-shared.mjs.map +1 -0
- package/public/resources/maplibre-gl-worker.mjs +10 -0
- package/public/resources/maplibre-gl-worker.mjs.map +1 -0
- package/public/resources/maplibre-gl.css +1 -1
- package/public/resources/maplibre-gl.mjs +819 -0
- package/public/resources/maplibre-gl.mjs.map +1 -0
- package/public/templates/data.tmpl +12 -6
- package/public/templates/viewer.tmpl +12 -8
- package/src/render_mode.js +18 -0
- package/src/serve_data.js +9 -3
- package/src/serve_rendered.js +3 -2
- package/test/fixtures/visual/static-marker-low-zoom-large-viewport.png +0 -0
- package/test/render_mode.js +22 -1
- package/test/static.js +20 -0
- package/test/static_images.js +5 -0
- package/test/tiles_data_compression.js +145 -0
- package/public/resources/maplibre-gl-inspect.js +0 -2934
- package/public/resources/maplibre-gl-inspect.js.map +0 -1
- package/public/resources/maplibre-gl.js +0 -59
- package/public/resources/maplibre-gl.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
### 🐞 Bug fixes
|
|
8
8
|
- _...Add new stuff here..._
|
|
9
9
|
|
|
10
|
-
## 5.7.0
|
|
10
|
+
## 5.7.0
|
|
11
11
|
### ✨ Features and improvements
|
|
12
12
|
- feat: add opt-in Prometheus metrics endpoint ([#2211](https://github.com/maptiler/tileserver-gl/pull/2211)) (by [navidnabavi](https://github.com/navidnabavi))
|
|
13
13
|
- feat: allow the data decorator to be asynchronous ([#2352](https://github.com/maptiler/tileserver-gl/pull/2352)) (by [acalcutt](https://github.com/acalcutt))
|
|
14
|
+
- Updates Maplibre-gl-js to v6 and maplibre-gl-inspect to v1.9.0. maplibre-gl-js v6 is ESM-only, so the viewer and data templates now load it as an ES module via an import map, and the elevation control is now an ES module. maplibre-gl-js v6 requires WebGL2; the viewer falls back to the raster (Leaflet) view without it ([#2360](https://github.com/maptiler/tileserver-gl/pull/2360)) (by [acalcutt](https://github.com/acalcutt))
|
|
14
15
|
|
|
15
16
|
### 🐞 Bug fixes
|
|
16
17
|
- fix: TypeError when style source value is a string (e.g. sprite path) ([#2179](https://github.com/maptiler/tileserver-gl/pull/2179)) (by [app/copilot-swe-agent](https://github.com/app/copilot-swe-agent))
|
|
@@ -23,6 +24,8 @@
|
|
|
23
24
|
- fix: restore the format-based sparse default ([#2348](https://github.com/maptiler/tileserver-gl/pull/2348)) (by [acalcutt](https://github.com/acalcutt))
|
|
24
25
|
- fix: align 512px static map overlays ([#2344](https://github.com/maptiler/tileserver-gl/pull/2344)) (by [miakh](https://github.com/miakh))
|
|
25
26
|
- fix: allow native install scripts under npm 12 so canvas builds ([#2343](https://github.com/maptiler/tileserver-gl/pull/2343)) (by [mikey923](https://github.com/mikey923))
|
|
27
|
+
- fix: align low-zoom static map overlays ([#2355](https://github.com/maptiler/tileserver-gl/pull/2355)) (by [miakh](https://github.com/miakh))
|
|
28
|
+
- perf: avoid recompressing gzipped mvt tiles ([#2369](https://github.com/maptiler/tileserver-gl/pull/2369)) (by [bvitlas](https://github.com/bvitlas))
|
|
26
29
|
|
|
27
30
|
## 5.6.0
|
|
28
31
|
### ✨ Features and improvements
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileserver-gl",
|
|
3
|
-
"version": "5.7.0
|
|
3
|
+
"version": "5.7.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": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"prepare": "npm run copy:maplibre && npm run copy:maplibre-inspect && npm run copy:mapbox-rtl-text && npm run copy:leaflet && npm run copy:leaflet-hash",
|
|
22
|
-
"copy:maplibre": "copyfiles -EVf node_modules/maplibre-gl/dist/maplibre-gl.
|
|
23
|
-
"copy:maplibre-inspect": "copyfiles -EVf node_modules/@maplibre/maplibre-gl-inspect/dist/maplibre-gl-inspect.
|
|
22
|
+
"copy:maplibre": "copyfiles -EVf node_modules/maplibre-gl/dist/maplibre-gl.mjs node_modules/maplibre-gl/dist/maplibre-gl.mjs.map node_modules/maplibre-gl/dist/maplibre-gl-shared.mjs node_modules/maplibre-gl/dist/maplibre-gl-shared.mjs.map node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs.map node_modules/maplibre-gl/dist/maplibre-gl.css public/resources/",
|
|
23
|
+
"copy:maplibre-inspect": "copyfiles -EVf node_modules/@maplibre/maplibre-gl-inspect/dist/maplibre-gl-inspect.mjs node_modules/@maplibre/maplibre-gl-inspect/dist/maplibre-gl-inspect.mjs.map node_modules/@maplibre/maplibre-gl-inspect/dist/maplibre-gl-inspect.css public/resources/",
|
|
24
24
|
"copy:mapbox-rtl-text": "copyfiles -EVf node_modules/@mapbox/mapbox-gl-rtl-text/dist/mapbox-gl-rtl-text.js public/resources/",
|
|
25
25
|
"copy:leaflet": "copyfiles -EVf node_modules/leaflet/dist/leaflet.js node_modules/leaflet/dist/leaflet.js.map node_modules/leaflet/dist/leaflet.css node_modules/leaflet/dist/leaflet-hash.js public/resources/",
|
|
26
26
|
"copy:leaflet-hash": "copyfiles -EVf node_modules/leaflet-hash/leaflet-hash.js public/resources/",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@mapbox/polyline": "^1.2.1",
|
|
45
45
|
"@mapbox/sphericalmercator": "2.0.2",
|
|
46
46
|
"@mapbox/vector-tile": "3.0.0",
|
|
47
|
-
"@maplibre/maplibre-gl-inspect": "1.
|
|
47
|
+
"@maplibre/maplibre-gl-inspect": "1.9.0",
|
|
48
48
|
"@maplibre/maplibre-gl-native": "6.4.1",
|
|
49
49
|
"@maplibre/maplibre-gl-style-spec": "24.10.0",
|
|
50
50
|
"@sindresorhus/fnv1a": "3.1.0",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"copyfiles": "2.4.1",
|
|
58
58
|
"cors": "2.8.6",
|
|
59
59
|
"express": "5.2.1",
|
|
60
|
-
"handlebars": "4.7.
|
|
60
|
+
"handlebars": "4.7.10",
|
|
61
61
|
"http-shutdown": "1.2.2",
|
|
62
62
|
"leaflet": "1.9.4",
|
|
63
63
|
"leaflet-hash": "0.2.1",
|
|
64
|
-
"maplibre-gl": "
|
|
65
|
-
"morgan": "1.
|
|
64
|
+
"maplibre-gl": "6.11.2",
|
|
65
|
+
"morgan": "1.12.1",
|
|
66
66
|
"pbf": "5.1.0",
|
|
67
67
|
"pmtiles": "4.4.1",
|
|
68
68
|
"proj4": "2.20.9",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"sanitize-filename": "1.6.4",
|
|
71
71
|
"secure-json-parse": "^4.1.0",
|
|
72
72
|
"semver": "^7.8.5",
|
|
73
|
-
"sharp": "0.35.
|
|
73
|
+
"sharp": "0.35.5",
|
|
74
74
|
"tileserver-gl-styles": "2.0.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"eslint-plugin-security": "^4.0.1",
|
|
89
89
|
"globals": "^17.7.0",
|
|
90
90
|
"lint-staged": "^17.0.8",
|
|
91
|
-
"mocha": "^
|
|
91
|
+
"mocha": "^12.0.0",
|
|
92
92
|
"node-addon-api": "^8",
|
|
93
93
|
"pixelmatch": "^7.2.0",
|
|
94
94
|
"prettier": "^3.9.4",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { Marker } from 'maplibre-gl';
|
|
2
|
+
|
|
3
|
+
export default class ElevationInfoControl {
|
|
2
4
|
constructor(options) {
|
|
3
5
|
this.url = options["url"];
|
|
4
6
|
this.originalTerrain = null;
|
|
@@ -49,10 +51,12 @@ class ElevationInfoControl {
|
|
|
49
51
|
this.controlContainer.classList.add("maplibre-ctrl-elevation");
|
|
50
52
|
this.controlContainer.textContent = "Elevation: Click on Map";
|
|
51
53
|
|
|
52
|
-
this.marker = new
|
|
54
|
+
this.marker = new Marker();
|
|
53
55
|
|
|
54
56
|
map.on('click', (e) => {
|
|
55
|
-
|
|
57
|
+
// map.transform was removed in maplibre-gl v6; a click off the globe unprojects
|
|
58
|
+
// to the horizon, so it does not round-trip back to the clicked pixel
|
|
59
|
+
if (map.project(map.unproject(e.point)).dist(e.point) > 1) {
|
|
56
60
|
this.controlContainer.textContent = "Elevation: Click on Globe";
|
|
57
61
|
return;
|
|
58
62
|
}
|
|
@@ -77,7 +81,7 @@ class ElevationInfoControl {
|
|
|
77
81
|
this.marker.remove();
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
this.marker = new
|
|
84
|
+
this.marker = new Marker();
|
|
81
85
|
this.marker.setLngLat({lng: lngLat.lng, lat: lngLat.lat});
|
|
82
86
|
this.marker.addTo(this.map);
|
|
83
87
|
} catch (_err) {
|