maplibre-gl 3.5.2 → 3.6.1
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/README.md +3 -1
- package/build/bump-version-changelog.js +26 -0
- package/dist/maplibre-gl-csp-worker.js +1 -1
- package/dist/maplibre-gl-csp-worker.js.map +1 -1
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-csp.js.map +1 -1
- package/dist/maplibre-gl-dev.js +59 -37
- package/dist/maplibre-gl-dev.js.map +1 -1
- package/dist/maplibre-gl.d.ts +19 -2
- package/dist/maplibre-gl.js +3 -3
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +33 -33
- package/src/style/style.test.ts +30 -0
- package/src/style/style.ts +10 -1
- package/src/ui/camera.test.ts +81 -0
- package/src/ui/camera.ts +3 -1
- package/src/ui/map.test.ts +30 -0
- package/src/ui/map.ts +14 -0
- package/src/util/resolve_tokens.test.ts +4 -0
- package/src/util/resolve_tokens.ts +2 -2
package/dist/maplibre-gl-dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v3.
|
|
1
|
+
/* MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v3.6.1/LICENSE.txt */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -28685,7 +28685,7 @@ SymbolBucket.addDynamicAttributes = addDynamicAttributes;
|
|
|
28685
28685
|
*/
|
|
28686
28686
|
function resolveTokens(properties, text) {
|
|
28687
28687
|
return text.replace(/{([^{}]+)}/g, (match, key) => {
|
|
28688
|
-
return key in properties ? String(properties[key]) : '';
|
|
28688
|
+
return properties && key in properties ? String(properties[key]) : '';
|
|
28689
28689
|
});
|
|
28690
28690
|
}
|
|
28691
28691
|
|
|
@@ -34684,7 +34684,7 @@ define(['./shared'], (function (performance) { 'use strict';
|
|
|
34684
34684
|
|
|
34685
34685
|
var name = "maplibre-gl";
|
|
34686
34686
|
var description = "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library";
|
|
34687
|
-
var version$2 = "3.
|
|
34687
|
+
var version$2 = "3.6.1";
|
|
34688
34688
|
var main = "dist/maplibre-gl.js";
|
|
34689
34689
|
var style = "dist/maplibre-gl.css";
|
|
34690
34690
|
var license = "BSD-3-Clause";
|
|
@@ -34704,11 +34704,11 @@ var dependencies = {
|
|
|
34704
34704
|
"@mapbox/vector-tile": "^1.3.1",
|
|
34705
34705
|
"@mapbox/whoots-js": "^3.1.0",
|
|
34706
34706
|
"@maplibre/maplibre-gl-style-spec": "^19.3.3",
|
|
34707
|
-
"@types/geojson": "^7946.0.
|
|
34708
|
-
"@types/mapbox__point-geometry": "^0.1.
|
|
34707
|
+
"@types/geojson": "^7946.0.13",
|
|
34708
|
+
"@types/mapbox__point-geometry": "^0.1.4",
|
|
34709
34709
|
"@types/mapbox__vector-tile": "^1.3.3",
|
|
34710
34710
|
"@types/pbf": "^3.0.4",
|
|
34711
|
-
"@types/supercluster": "^7.1.
|
|
34711
|
+
"@types/supercluster": "^7.1.3",
|
|
34712
34712
|
earcut: "^2.2.4",
|
|
34713
34713
|
"geojson-vt": "^3.2.1",
|
|
34714
34714
|
"gl-matrix": "^3.4.3",
|
|
@@ -34728,49 +34728,49 @@ var devDependencies = {
|
|
|
34728
34728
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
34729
34729
|
"@rollup/plugin-json": "^6.0.1",
|
|
34730
34730
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
34731
|
-
"@rollup/plugin-replace": "^5.0.
|
|
34731
|
+
"@rollup/plugin-replace": "^5.0.5",
|
|
34732
34732
|
"@rollup/plugin-strip": "^3.0.4",
|
|
34733
34733
|
"@rollup/plugin-terser": "^0.4.4",
|
|
34734
34734
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
34735
|
-
"@types/benchmark": "^2.1.
|
|
34735
|
+
"@types/benchmark": "^2.1.5",
|
|
34736
34736
|
"@types/cssnano": "^5.0.0",
|
|
34737
|
-
"@types/d3": "^7.4.
|
|
34738
|
-
"@types/diff": "^5.0.
|
|
34739
|
-
"@types/earcut": "^2.1.
|
|
34740
|
-
"@types/eslint": "^8.44.
|
|
34741
|
-
"@types/geojson-vt": "3.2.
|
|
34737
|
+
"@types/d3": "^7.4.2",
|
|
34738
|
+
"@types/diff": "^5.0.8",
|
|
34739
|
+
"@types/earcut": "^2.1.4",
|
|
34740
|
+
"@types/eslint": "^8.44.7",
|
|
34741
|
+
"@types/geojson-vt": "3.2.4",
|
|
34742
34742
|
"@types/gl": "^6.0.4",
|
|
34743
34743
|
"@types/glob": "^8.1.0",
|
|
34744
34744
|
"@types/jest": "^29.5.3",
|
|
34745
|
-
"@types/jsdom": "^21.1.
|
|
34746
|
-
"@types/minimist": "^1.2.
|
|
34745
|
+
"@types/jsdom": "^21.1.5",
|
|
34746
|
+
"@types/minimist": "^1.2.5",
|
|
34747
34747
|
"@types/murmurhash-js": "^1.0.5",
|
|
34748
|
-
"@types/nise": "^1.4.
|
|
34748
|
+
"@types/nise": "^1.4.4",
|
|
34749
34749
|
"@types/node": "^20.8.3",
|
|
34750
|
-
"@types/offscreencanvas": "^2019.7.
|
|
34751
|
-
"@types/pixelmatch": "^5.2.
|
|
34752
|
-
"@types/pngjs": "^6.0.
|
|
34753
|
-
"@types/react": "^18.2.
|
|
34754
|
-
"@types/react-dom": "^18.2.
|
|
34755
|
-
"@types/request": "^2.48.
|
|
34756
|
-
"@types/shuffle-seed": "^1.1.
|
|
34757
|
-
"@types/window-or-global": "^1.0.
|
|
34758
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
34759
|
-
"@typescript-eslint/parser": "^6.
|
|
34750
|
+
"@types/offscreencanvas": "^2019.7.3",
|
|
34751
|
+
"@types/pixelmatch": "^5.2.5",
|
|
34752
|
+
"@types/pngjs": "^6.0.4",
|
|
34753
|
+
"@types/react": "^18.2.35",
|
|
34754
|
+
"@types/react-dom": "^18.2.14",
|
|
34755
|
+
"@types/request": "^2.48.12",
|
|
34756
|
+
"@types/shuffle-seed": "^1.1.2",
|
|
34757
|
+
"@types/window-or-global": "^1.0.6",
|
|
34758
|
+
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
34759
|
+
"@typescript-eslint/parser": "^6.10.0",
|
|
34760
34760
|
address: "^2.0.1",
|
|
34761
34761
|
benchmark: "^2.1.4",
|
|
34762
34762
|
canvas: "^2.11.2",
|
|
34763
34763
|
cssnano: "^6.0.1",
|
|
34764
34764
|
d3: "^7.8.5",
|
|
34765
34765
|
"d3-queue": "^3.0.7",
|
|
34766
|
-
"devtools-protocol": "^0.0.
|
|
34766
|
+
"devtools-protocol": "^0.0.1219864",
|
|
34767
34767
|
diff: "^5.1.0",
|
|
34768
|
-
"dts-bundle-generator": "^8.
|
|
34769
|
-
eslint: "^8.
|
|
34768
|
+
"dts-bundle-generator": "^8.1.2",
|
|
34769
|
+
eslint: "^8.53.0",
|
|
34770
34770
|
"eslint-config-mourner": "^3.0.0",
|
|
34771
34771
|
"eslint-plugin-html": "^7.1.0",
|
|
34772
|
-
"eslint-plugin-import": "^2.
|
|
34773
|
-
"eslint-plugin-jest": "^27.
|
|
34772
|
+
"eslint-plugin-import": "^2.29.0",
|
|
34773
|
+
"eslint-plugin-jest": "^27.6.0",
|
|
34774
34774
|
"eslint-plugin-react": "^7.33.2",
|
|
34775
34775
|
"eslint-plugin-tsdoc": "0.2.17",
|
|
34776
34776
|
expect: "^29.7.0",
|
|
@@ -34794,10 +34794,10 @@ var devDependencies = {
|
|
|
34794
34794
|
"postcss-cli": "^10.1.0",
|
|
34795
34795
|
"postcss-inline-svg": "^6.0.0",
|
|
34796
34796
|
"pretty-bytes": "^6.1.1",
|
|
34797
|
-
puppeteer: "^21.
|
|
34797
|
+
puppeteer: "^21.5.1",
|
|
34798
34798
|
react: "^18.2.0",
|
|
34799
34799
|
"react-dom": "^18.2.0",
|
|
34800
|
-
rollup: "^4.
|
|
34800
|
+
rollup: "^4.4.0",
|
|
34801
34801
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
34802
34802
|
rw: "^1.3.3",
|
|
34803
34803
|
semver: "^7.5.4",
|
|
@@ -34809,8 +34809,8 @@ var devDependencies = {
|
|
|
34809
34809
|
"ts-jest": "^29.1.1",
|
|
34810
34810
|
"ts-node": "^10.9.1",
|
|
34811
34811
|
tslib: "^2.6.2",
|
|
34812
|
-
typedoc: "^0.25.
|
|
34813
|
-
"typedoc-plugin-markdown": "^3.
|
|
34812
|
+
typedoc: "^0.25.3",
|
|
34813
|
+
"typedoc-plugin-markdown": "^3.17.1",
|
|
34814
34814
|
"typedoc-plugin-missing-exports": "^2.1.0",
|
|
34815
34815
|
typescript: "^5.2.2"
|
|
34816
34816
|
};
|
|
@@ -42882,7 +42882,15 @@ class Style extends performance.Evented {
|
|
|
42882
42882
|
return this._layers[id];
|
|
42883
42883
|
}
|
|
42884
42884
|
/**
|
|
42885
|
-
*
|
|
42885
|
+
* Return the ids of all layers currently in the style, including custom layers, in order.
|
|
42886
|
+
*
|
|
42887
|
+
* @returns ids of layers, in order
|
|
42888
|
+
*/
|
|
42889
|
+
getLayersOrder() {
|
|
42890
|
+
return [...this._order];
|
|
42891
|
+
}
|
|
42892
|
+
/**
|
|
42893
|
+
* Checks if a specific layer is present within the style.
|
|
42886
42894
|
*
|
|
42887
42895
|
* @param id - the id of the desired layer
|
|
42888
42896
|
* @returns a boolean specifying if the given layer is present
|
|
@@ -50888,7 +50896,8 @@ class Camera extends performance.Evented {
|
|
|
50888
50896
|
this._renderFrameCallback = () => {
|
|
50889
50897
|
const t = Math.min((performance.browser.now() - this._easeStart) / this._easeOptions.duration, 1);
|
|
50890
50898
|
this._onEaseFrame(this._easeOptions.easing(t));
|
|
50891
|
-
if
|
|
50899
|
+
// if _stop is called during _onEaseFrame from _fireMoveEvents we should avoid a new _requestRenderFrame, checking it by ensuring _easeFrameId was not deleted
|
|
50900
|
+
if (t < 1 && this._easeFrameId) {
|
|
50892
50901
|
this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback);
|
|
50893
50902
|
}
|
|
50894
50903
|
else {
|
|
@@ -54594,6 +54603,19 @@ let Map$1 = class Map extends Camera {
|
|
|
54594
54603
|
getLayer(id) {
|
|
54595
54604
|
return this.style.getLayer(id);
|
|
54596
54605
|
}
|
|
54606
|
+
/**
|
|
54607
|
+
* Return the ids of all layers currently in the style, including custom layers, in order.
|
|
54608
|
+
*
|
|
54609
|
+
* @returns ids of layers, in order
|
|
54610
|
+
*
|
|
54611
|
+
* @example
|
|
54612
|
+
* ```ts
|
|
54613
|
+
* const orderedLayerIds = map.getLayersOrder();
|
|
54614
|
+
* ```
|
|
54615
|
+
*/
|
|
54616
|
+
getLayersOrder() {
|
|
54617
|
+
return this.style.getLayersOrder();
|
|
54618
|
+
}
|
|
54597
54619
|
/**
|
|
54598
54620
|
* Sets the zoom extent for the specified style layer. The zoom extent includes the
|
|
54599
54621
|
* [minimum zoom level](https://maplibre.org/maplibre-style-spec/layers/#minzoom)
|