tileserver-gl 5.2.1 → 5.3.0-pre.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 +5 -0
- package/package.json +32 -22
- package/public/resources/fonts/OpenSans-Bold.ttf +0 -0
- package/public/resources/fonts/OpenSans-Italic.ttf +0 -0
- package/public/resources/fonts/OpenSans-Regular.ttf +0 -0
- package/public/resources/leaflet-hash.js +162 -0
- package/public/resources/leaflet.css +661 -0
- package/public/resources/leaflet.js +6 -0
- package/public/resources/leaflet.js.map +1 -0
- package/public/resources/mapbox-gl-rtl-text.js +1 -0
- package/public/resources/maplibre-gl-inspect.css +40 -0
- package/public/resources/maplibre-gl-inspect.js +2877 -0
- package/public/resources/maplibre-gl-inspect.js.map +1 -0
- package/public/resources/maplibre-gl.css +1 -0
- package/public/resources/maplibre-gl.js +59 -0
- package/public/resources/maplibre-gl.js.map +1 -0
- package/public/templates/data.tmpl +3 -0
- package/public/templates/viewer.tmpl +22 -1
- package/src/render.js +1 -2
- package/src/serve_data.js +1 -1
- package/src/serve_rendered.js +1 -1
- package/src/server.js +1 -1
- package/.dockerignore +0 -8
- package/.eslintignore +0 -1
- package/.eslintrc.cjs +0 -36
- package/.gitattributes +0 -11
- package/.github/dependabot.yml +0 -19
- package/.github/workflows/automerger.yml +0 -17
- package/.github/workflows/ci.yml +0 -56
- package/.github/workflows/codeql.yml +0 -37
- package/.github/workflows/ct.yml +0 -86
- package/.github/workflows/pipeline.yml +0 -43
- package/.github/workflows/release.yml +0 -175
- package/.hadolint.yml +0 -3
- package/.nvmrc +0 -1
- package/.prettierignore +0 -1
- package/.readthedocs.yaml +0 -18
- package/Dockerfile +0 -110
- package/Dockerfile_build +0 -38
- package/Dockerfile_light +0 -84
- package/Dockerfile_test +0 -62
- package/ISSUE_TEMPLATE.md +0 -21
- package/PUBLISHING.md +0 -112
- package/README_light.md +0 -35
- package/commitlint.config.cjs +0 -3
- package/docker-entrypoint.sh +0 -10
- package/docker-entrypoint_light.sh +0 -7
- package/lint-staged.config.cjs +0 -4
- package/prettier.config.cjs +0 -13
- package/publish.js +0 -66
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# tileserver-gl changelog
|
|
2
2
|
|
|
3
|
+
## 5.3.0-pre.0
|
|
4
|
+
* Fix - Include public\resources js files on npm publish by specifying included files in package.json (https://github.com/maptiler/tileserver-gl/pull/1490) by @acalcutt
|
|
5
|
+
* Fix - Various Updates and Fix RTL Plugin Load (https://github.com/maptiler/tileserver-gl/pull/1489) by @okimiko
|
|
6
|
+
* Updates Maplibre-gl-js to v5 and adds globe support.
|
|
7
|
+
|
|
3
8
|
## 5.2.1
|
|
4
9
|
* Fix invalid Delete of 'prepare' Script required for Light Build (https://github.com/maptiler/tileserver-gl/pull/1489) by @okimiko
|
|
5
10
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileserver-gl",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0-pre.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": "src/main.js",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"docs",
|
|
10
|
+
"src",
|
|
11
|
+
"public",
|
|
12
|
+
"test",
|
|
13
|
+
"package.json",
|
|
14
|
+
"CHANGELOG.md",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
8
18
|
"scripts": {
|
|
9
19
|
"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",
|
|
10
20
|
"copy:maplibre": "copyfiles -EVf node_modules/maplibre-gl/dist/maplibre-gl.js node_modules/maplibre-gl/dist/maplibre-gl.js.map node_modules/maplibre-gl/dist/maplibre-gl.css public/resources/",
|
|
@@ -28,53 +38,53 @@
|
|
|
28
38
|
"@mapbox/mapbox-gl-rtl-text": "0.3.0",
|
|
29
39
|
"@mapbox/mbtiles": "0.12.1",
|
|
30
40
|
"@mapbox/polyline": "^1.2.1",
|
|
31
|
-
"@mapbox/sphericalmercator": "
|
|
41
|
+
"@mapbox/sphericalmercator": "2.0.1",
|
|
32
42
|
"@mapbox/vector-tile": "2.0.3",
|
|
33
|
-
"@maplibre/maplibre-gl-inspect": "1.7.
|
|
43
|
+
"@maplibre/maplibre-gl-inspect": "1.7.1",
|
|
34
44
|
"@maplibre/maplibre-gl-native": "6.0.0",
|
|
35
|
-
"@maplibre/maplibre-gl-style-spec": "
|
|
45
|
+
"@maplibre/maplibre-gl-style-spec": "23.1.0",
|
|
36
46
|
"@sindresorhus/fnv1a": "3.1.0",
|
|
37
47
|
"advanced-pool": "0.3.3",
|
|
38
|
-
"axios": "^1.8.
|
|
39
|
-
"canvas": "3.0
|
|
40
|
-
"chokidar": "
|
|
48
|
+
"axios": "^1.8.4",
|
|
49
|
+
"canvas": "3.1.0",
|
|
50
|
+
"chokidar": "4.0.3",
|
|
41
51
|
"clone": "2.1.2",
|
|
42
|
-
"color": "
|
|
43
|
-
"commander": "
|
|
52
|
+
"color": "5.0.0",
|
|
53
|
+
"commander": "13.1.0",
|
|
44
54
|
"copyfiles": "2.4.1",
|
|
45
55
|
"cors": "2.8.5",
|
|
46
|
-
"express": "5.0
|
|
56
|
+
"express": "5.1.0",
|
|
47
57
|
"handlebars": "4.7.8",
|
|
48
58
|
"http-shutdown": "1.2.2",
|
|
49
59
|
"leaflet": "1.9.4",
|
|
50
60
|
"leaflet-hash": "0.2.1",
|
|
51
|
-
"maplibre-gl": "
|
|
61
|
+
"maplibre-gl": "5.3.1",
|
|
52
62
|
"morgan": "1.10.0",
|
|
53
63
|
"pbf": "4.0.1",
|
|
54
|
-
"pmtiles": "3.0
|
|
55
|
-
"proj4": "2.
|
|
64
|
+
"pmtiles": "4.3.0",
|
|
65
|
+
"proj4": "2.15.0",
|
|
56
66
|
"sanitize-filename": "1.6.3",
|
|
57
67
|
"semver": "^7.6.3",
|
|
58
|
-
"sharp": "0.
|
|
68
|
+
"sharp": "0.34.1",
|
|
59
69
|
"tileserver-gl-styles": "2.0.0"
|
|
60
70
|
},
|
|
61
71
|
"devDependencies": {
|
|
62
|
-
"@commitlint/cli": "^19.
|
|
63
|
-
"@commitlint/config-conventional": "^19.
|
|
72
|
+
"@commitlint/cli": "^19.8.0",
|
|
73
|
+
"@commitlint/config-conventional": "^19.8.0",
|
|
64
74
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
65
75
|
"@typescript-eslint/parser": "^7.18.0",
|
|
66
|
-
"chai": "5.
|
|
76
|
+
"chai": "5.2.0",
|
|
67
77
|
"eslint": "^8.57.0",
|
|
68
78
|
"eslint-config-prettier": "^9.1.0",
|
|
69
|
-
"eslint-plugin-jsdoc": "^50.
|
|
70
|
-
"eslint-plugin-prettier": "^5.2.
|
|
79
|
+
"eslint-plugin-jsdoc": "^50.6.9",
|
|
80
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
71
81
|
"eslint-plugin-security": "^1.7.1",
|
|
72
82
|
"lint-staged": "^15.2.10",
|
|
73
|
-
"mocha": "^
|
|
83
|
+
"mocha": "^11.1.0",
|
|
74
84
|
"node-addon-api": "^8",
|
|
75
|
-
"prettier": "^3.
|
|
85
|
+
"prettier": "^3.5.3",
|
|
76
86
|
"should": "^13.2.3",
|
|
77
|
-
"supertest": "^7.
|
|
87
|
+
"supertest": "^7.1.0",
|
|
78
88
|
"yaml-lint": "^1.7.0"
|
|
79
89
|
},
|
|
80
90
|
"keywords": [
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
(function(window) {
|
|
2
|
+
var HAS_HASHCHANGE = (function() {
|
|
3
|
+
var doc_mode = window.documentMode;
|
|
4
|
+
return ('onhashchange' in window) &&
|
|
5
|
+
(doc_mode === undefined || doc_mode > 7);
|
|
6
|
+
})();
|
|
7
|
+
|
|
8
|
+
L.Hash = function(map) {
|
|
9
|
+
this.onHashChange = L.Util.bind(this.onHashChange, this);
|
|
10
|
+
|
|
11
|
+
if (map) {
|
|
12
|
+
this.init(map);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
L.Hash.parseHash = function(hash) {
|
|
17
|
+
if(hash.indexOf('#') === 0) {
|
|
18
|
+
hash = hash.substr(1);
|
|
19
|
+
}
|
|
20
|
+
var args = hash.split("/");
|
|
21
|
+
if (args.length == 3) {
|
|
22
|
+
var zoom = parseInt(args[0], 10),
|
|
23
|
+
lat = parseFloat(args[1]),
|
|
24
|
+
lon = parseFloat(args[2]);
|
|
25
|
+
if (isNaN(zoom) || isNaN(lat) || isNaN(lon)) {
|
|
26
|
+
return false;
|
|
27
|
+
} else {
|
|
28
|
+
return {
|
|
29
|
+
center: new L.LatLng(lat, lon),
|
|
30
|
+
zoom: zoom
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
L.Hash.formatHash = function(map) {
|
|
39
|
+
var center = map.getCenter(),
|
|
40
|
+
zoom = map.getZoom(),
|
|
41
|
+
precision = Math.max(0, Math.ceil(Math.log(zoom) / Math.LN2));
|
|
42
|
+
|
|
43
|
+
return "#" + [zoom,
|
|
44
|
+
center.lat.toFixed(precision),
|
|
45
|
+
center.lng.toFixed(precision)
|
|
46
|
+
].join("/");
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
L.Hash.prototype = {
|
|
50
|
+
map: null,
|
|
51
|
+
lastHash: null,
|
|
52
|
+
|
|
53
|
+
parseHash: L.Hash.parseHash,
|
|
54
|
+
formatHash: L.Hash.formatHash,
|
|
55
|
+
|
|
56
|
+
init: function(map) {
|
|
57
|
+
this.map = map;
|
|
58
|
+
|
|
59
|
+
// reset the hash
|
|
60
|
+
this.lastHash = null;
|
|
61
|
+
this.onHashChange();
|
|
62
|
+
|
|
63
|
+
if (!this.isListening) {
|
|
64
|
+
this.startListening();
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
removeFrom: function(map) {
|
|
69
|
+
if (this.changeTimeout) {
|
|
70
|
+
clearTimeout(this.changeTimeout);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (this.isListening) {
|
|
74
|
+
this.stopListening();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
this.map = null;
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
onMapMove: function() {
|
|
81
|
+
// bail if we're moving the map (updating from a hash),
|
|
82
|
+
// or if the map is not yet loaded
|
|
83
|
+
|
|
84
|
+
if (this.movingMap || !this.map._loaded) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
var hash = this.formatHash(this.map);
|
|
89
|
+
if (this.lastHash != hash) {
|
|
90
|
+
location.replace(hash);
|
|
91
|
+
this.lastHash = hash;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
movingMap: false,
|
|
96
|
+
update: function() {
|
|
97
|
+
var hash = location.hash;
|
|
98
|
+
if (hash === this.lastHash) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
var parsed = this.parseHash(hash);
|
|
102
|
+
if (parsed) {
|
|
103
|
+
this.movingMap = true;
|
|
104
|
+
|
|
105
|
+
this.map.setView(parsed.center, parsed.zoom);
|
|
106
|
+
|
|
107
|
+
this.movingMap = false;
|
|
108
|
+
} else {
|
|
109
|
+
this.onMapMove(this.map);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
// defer hash change updates every 100ms
|
|
114
|
+
changeDefer: 100,
|
|
115
|
+
changeTimeout: null,
|
|
116
|
+
onHashChange: function() {
|
|
117
|
+
// throttle calls to update() so that they only happen every
|
|
118
|
+
// `changeDefer` ms
|
|
119
|
+
if (!this.changeTimeout) {
|
|
120
|
+
var that = this;
|
|
121
|
+
this.changeTimeout = setTimeout(function() {
|
|
122
|
+
that.update();
|
|
123
|
+
that.changeTimeout = null;
|
|
124
|
+
}, this.changeDefer);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
isListening: false,
|
|
129
|
+
hashChangeInterval: null,
|
|
130
|
+
startListening: function() {
|
|
131
|
+
this.map.on("moveend", this.onMapMove, this);
|
|
132
|
+
|
|
133
|
+
if (HAS_HASHCHANGE) {
|
|
134
|
+
L.DomEvent.addListener(window, "hashchange", this.onHashChange);
|
|
135
|
+
} else {
|
|
136
|
+
clearInterval(this.hashChangeInterval);
|
|
137
|
+
this.hashChangeInterval = setInterval(this.onHashChange, 50);
|
|
138
|
+
}
|
|
139
|
+
this.isListening = true;
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
stopListening: function() {
|
|
143
|
+
this.map.off("moveend", this.onMapMove, this);
|
|
144
|
+
|
|
145
|
+
if (HAS_HASHCHANGE) {
|
|
146
|
+
L.DomEvent.removeListener(window, "hashchange", this.onHashChange);
|
|
147
|
+
} else {
|
|
148
|
+
clearInterval(this.hashChangeInterval);
|
|
149
|
+
}
|
|
150
|
+
this.isListening = false;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
L.hash = function(map) {
|
|
154
|
+
return new L.Hash(map);
|
|
155
|
+
};
|
|
156
|
+
L.Map.prototype.addHash = function() {
|
|
157
|
+
this._hash = L.hash(this);
|
|
158
|
+
};
|
|
159
|
+
L.Map.prototype.removeHash = function() {
|
|
160
|
+
this._hash.removeFrom();
|
|
161
|
+
};
|
|
162
|
+
})(window);
|