maplibre-gl 3.6.0 → 3.6.2
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 +0 -36
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-csp.js.map +1 -1
- package/dist/maplibre-gl-dev.js +57 -38
- package/dist/maplibre-gl-dev.js.map +1 -1
- package/dist/maplibre-gl.d.ts +2 -1
- package/dist/maplibre-gl.js +4 -4
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +35 -35
- package/src/render/terrain.test.ts +56 -1
- package/src/render/terrain.ts +17 -2
- package/src/render/update_pattern_positions_in_program.test.ts +74 -0
- package/src/render/update_pattern_positions_in_program.ts +4 -0
- package/src/ui/camera.test.ts +81 -0
- package/src/ui/camera.ts +3 -1
- package/src/ui/map.test.ts +1 -1
- package/src/ui/map.ts +1 -1
- package/src/util/test/mock_fetch.ts +1 -1
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.6.
|
|
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.2/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) :
|
|
@@ -31978,6 +31978,7 @@ exports.isSafari = isSafari;
|
|
|
31978
31978
|
exports.isWorker = isWorker;
|
|
31979
31979
|
exports.keysDifference = keysDifference;
|
|
31980
31980
|
exports.lazyLoadRTLTextPlugin = lazyLoadRTLTextPlugin;
|
|
31981
|
+
exports.lngFromMercatorX = lngFromMercatorX;
|
|
31981
31982
|
exports.makeRequest = makeRequest;
|
|
31982
31983
|
exports.mapObject = mapObject;
|
|
31983
31984
|
exports.mercatorXfromLng = mercatorXfromLng;
|
|
@@ -34684,7 +34685,7 @@ define(['./shared'], (function (performance) { 'use strict';
|
|
|
34684
34685
|
|
|
34685
34686
|
var name = "maplibre-gl";
|
|
34686
34687
|
var description = "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library";
|
|
34687
|
-
var version$2 = "3.6.
|
|
34688
|
+
var version$2 = "3.6.2";
|
|
34688
34689
|
var main = "dist/maplibre-gl.js";
|
|
34689
34690
|
var style = "dist/maplibre-gl.css";
|
|
34690
34691
|
var license = "BSD-3-Clause";
|
|
@@ -34704,11 +34705,11 @@ var dependencies = {
|
|
|
34704
34705
|
"@mapbox/vector-tile": "^1.3.1",
|
|
34705
34706
|
"@mapbox/whoots-js": "^3.1.0",
|
|
34706
34707
|
"@maplibre/maplibre-gl-style-spec": "^19.3.3",
|
|
34707
|
-
"@types/geojson": "^7946.0.
|
|
34708
|
-
"@types/mapbox__point-geometry": "^0.1.
|
|
34709
|
-
"@types/mapbox__vector-tile": "^1.3.
|
|
34710
|
-
"@types/pbf": "^3.0.
|
|
34711
|
-
"@types/supercluster": "^7.1.
|
|
34708
|
+
"@types/geojson": "^7946.0.13",
|
|
34709
|
+
"@types/mapbox__point-geometry": "^0.1.4",
|
|
34710
|
+
"@types/mapbox__vector-tile": "^1.3.4",
|
|
34711
|
+
"@types/pbf": "^3.0.5",
|
|
34712
|
+
"@types/supercluster": "^7.1.3",
|
|
34712
34713
|
earcut: "^2.2.4",
|
|
34713
34714
|
"geojson-vt": "^3.2.1",
|
|
34714
34715
|
"gl-matrix": "^3.4.3",
|
|
@@ -34732,41 +34733,41 @@ var devDependencies = {
|
|
|
34732
34733
|
"@rollup/plugin-strip": "^3.0.4",
|
|
34733
34734
|
"@rollup/plugin-terser": "^0.4.4",
|
|
34734
34735
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
34735
|
-
"@types/benchmark": "^2.1.
|
|
34736
|
+
"@types/benchmark": "^2.1.5",
|
|
34736
34737
|
"@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.
|
|
34742
|
-
"@types/gl": "^6.0.
|
|
34738
|
+
"@types/d3": "^7.4.3",
|
|
34739
|
+
"@types/diff": "^5.0.8",
|
|
34740
|
+
"@types/earcut": "^2.1.4",
|
|
34741
|
+
"@types/eslint": "^8.44.7",
|
|
34742
|
+
"@types/geojson-vt": "3.2.4",
|
|
34743
|
+
"@types/gl": "^6.0.5",
|
|
34743
34744
|
"@types/glob": "^8.1.0",
|
|
34744
|
-
"@types/jest": "^29.5.
|
|
34745
|
-
"@types/jsdom": "^21.1.
|
|
34746
|
-
"@types/minimist": "^1.2.
|
|
34747
|
-
"@types/murmurhash-js": "^1.0.
|
|
34748
|
-
"@types/nise": "^1.4.
|
|
34749
|
-
"@types/node": "^20.
|
|
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.
|
|
34745
|
+
"@types/jest": "^29.5.8",
|
|
34746
|
+
"@types/jsdom": "^21.1.5",
|
|
34747
|
+
"@types/minimist": "^1.2.5",
|
|
34748
|
+
"@types/murmurhash-js": "^1.0.6",
|
|
34749
|
+
"@types/nise": "^1.4.4",
|
|
34750
|
+
"@types/node": "^20.9.2",
|
|
34751
|
+
"@types/offscreencanvas": "^2019.7.3",
|
|
34752
|
+
"@types/pixelmatch": "^5.2.6",
|
|
34753
|
+
"@types/pngjs": "^6.0.4",
|
|
34754
|
+
"@types/react": "^18.2.37",
|
|
34755
|
+
"@types/react-dom": "^18.2.15",
|
|
34756
|
+
"@types/request": "^2.48.12",
|
|
34757
|
+
"@types/shuffle-seed": "^1.1.2",
|
|
34758
|
+
"@types/window-or-global": "^1.0.6",
|
|
34759
|
+
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
|
34760
|
+
"@typescript-eslint/parser": "^6.11.0",
|
|
34760
34761
|
address: "^2.0.1",
|
|
34761
34762
|
benchmark: "^2.1.4",
|
|
34762
34763
|
canvas: "^2.11.2",
|
|
34763
34764
|
cssnano: "^6.0.1",
|
|
34764
34765
|
d3: "^7.8.5",
|
|
34765
34766
|
"d3-queue": "^3.0.7",
|
|
34766
|
-
"devtools-protocol": "^0.0.
|
|
34767
|
+
"devtools-protocol": "^0.0.1226504",
|
|
34767
34768
|
diff: "^5.1.0",
|
|
34768
34769
|
"dts-bundle-generator": "^8.1.2",
|
|
34769
|
-
eslint: "^8.
|
|
34770
|
+
eslint: "^8.54.0",
|
|
34770
34771
|
"eslint-config-mourner": "^3.0.0",
|
|
34771
34772
|
"eslint-plugin-html": "^7.1.0",
|
|
34772
34773
|
"eslint-plugin-import": "^2.29.0",
|
|
@@ -34777,9 +34778,9 @@ var devDependencies = {
|
|
|
34777
34778
|
gl: "^6.0.2",
|
|
34778
34779
|
glob: "^10.3.10",
|
|
34779
34780
|
"is-builtin-module": "^3.2.1",
|
|
34780
|
-
jest: "^29.
|
|
34781
|
+
jest: "^29.7.0",
|
|
34781
34782
|
"jest-canvas-mock": "^2.5.2",
|
|
34782
|
-
"jest-environment-jsdom": "^29.
|
|
34783
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
34783
34784
|
jsdom: "^22.1.0",
|
|
34784
34785
|
"json-stringify-pretty-compact": "^4.0.0",
|
|
34785
34786
|
minimist: "^1.2.8",
|
|
@@ -34794,10 +34795,10 @@ var devDependencies = {
|
|
|
34794
34795
|
"postcss-cli": "^10.1.0",
|
|
34795
34796
|
"postcss-inline-svg": "^6.0.0",
|
|
34796
34797
|
"pretty-bytes": "^6.1.1",
|
|
34797
|
-
puppeteer: "^21.5.
|
|
34798
|
+
puppeteer: "^21.5.2",
|
|
34798
34799
|
react: "^18.2.0",
|
|
34799
34800
|
"react-dom": "^18.2.0",
|
|
34800
|
-
rollup: "^4.
|
|
34801
|
+
rollup: "^4.5.0",
|
|
34801
34802
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
34802
34803
|
rw: "^1.3.3",
|
|
34803
34804
|
semver: "^7.5.4",
|
|
@@ -46281,6 +46282,11 @@ function updatePatternPositionsInProgram(programConfiguration, propertyName, con
|
|
|
46281
46282
|
const patternPositions = tile.imageAtlas.patternPositions;
|
|
46282
46283
|
let posTo = patternPositions[constantPattern.to.toString()];
|
|
46283
46284
|
let posFrom = patternPositions[constantPattern.from.toString()];
|
|
46285
|
+
// https://github.com/maplibre/maplibre-gl-js/issues/3377
|
|
46286
|
+
if (!posTo && posFrom)
|
|
46287
|
+
posTo = posFrom;
|
|
46288
|
+
if (!posFrom && posTo)
|
|
46289
|
+
posFrom = posTo;
|
|
46284
46290
|
// try again in case patternPositions has been updated by worker
|
|
46285
46291
|
if (!posTo || !posFrom) {
|
|
46286
46292
|
const transitioned = layer.getPaintProperty(propertyName);
|
|
@@ -50896,7 +50902,8 @@ class Camera extends performance.Evented {
|
|
|
50896
50902
|
this._renderFrameCallback = () => {
|
|
50897
50903
|
const t = Math.min((performance.browser.now() - this._easeStart) / this._easeOptions.duration, 1);
|
|
50898
50904
|
this._onEaseFrame(this._easeOptions.easing(t));
|
|
50899
|
-
if
|
|
50905
|
+
// if _stop is called during _onEaseFrame from _fireMoveEvents we should avoid a new _requestRenderFrame, checking it by ensuring _easeFrameId was not deleted
|
|
50906
|
+
if (t < 1 && this._easeFrameId) {
|
|
50900
50907
|
this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback);
|
|
50901
50908
|
}
|
|
50902
50909
|
else {
|
|
@@ -52593,7 +52600,8 @@ class Terrain {
|
|
|
52593
52600
|
return null;
|
|
52594
52601
|
const coordsSize = this._coordsTextureSize;
|
|
52595
52602
|
const worldSize = (1 << tile.tileID.canonical.z) * coordsSize;
|
|
52596
|
-
|
|
52603
|
+
const mercatorX = (tile.tileID.canonical.x * coordsSize + x) / worldSize;
|
|
52604
|
+
return new performance.MercatorCoordinate(this._allowMercatorOverflow(p, mercatorX), (tile.tileID.canonical.y * coordsSize + y) / worldSize, this.getElevation(tile.tileID, x, y, coordsSize));
|
|
52597
52605
|
}
|
|
52598
52606
|
/**
|
|
52599
52607
|
* create a regular mesh which will be used by all terrain-tiles
|
|
@@ -52692,6 +52700,17 @@ class Terrain {
|
|
|
52692
52700
|
mercatorY
|
|
52693
52701
|
};
|
|
52694
52702
|
}
|
|
52703
|
+
_allowMercatorOverflow(p, mercatorX) {
|
|
52704
|
+
const inLeftHalf = p.x < (this.painter.width / 2);
|
|
52705
|
+
let lng = performance.lngFromMercatorX(mercatorX);
|
|
52706
|
+
const centerLng = this.painter.transform.center.lng;
|
|
52707
|
+
if ((inLeftHalf && Math.sign(lng) > 0 && Math.sign(centerLng) < 0) ||
|
|
52708
|
+
(!inLeftHalf && Math.sign(lng) < 0 && Math.sign(centerLng) > 0)) {
|
|
52709
|
+
lng = 360 * Math.sign(centerLng) + lng;
|
|
52710
|
+
return performance.mercatorXfromLng(lng);
|
|
52711
|
+
}
|
|
52712
|
+
return mercatorX;
|
|
52713
|
+
}
|
|
52695
52714
|
}
|
|
52696
52715
|
|
|
52697
52716
|
/**
|