From 7d2c030ebd43e3dc6512c1dec70d69e1808048b1 Mon Sep 17 00:00:00 2001 From: vcoppe Date: Tue, 24 Dec 2024 16:50:52 +0100 Subject: [PATCH] update Mapbox GL JS, closes #129 --- website/package-lock.json | 22 ++++++++++++++-------- website/package.json | 2 +- website/src/lib/components/Map.svelte | 14 -------------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 5069e738..a2215cd5 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -23,7 +23,7 @@ "immer": "^10.1.1", "lucide-static": "^0.460.0", "lucide-svelte": "^0.460.1", - "mapbox-gl": "^3.7.0", + "mapbox-gl": "^3.9.1", "mapillary-js": "^4.1.2", "mode-watcher": "^0.3.1", "png.js": "^0.2.1", @@ -2210,9 +2210,10 @@ "dev": true }, "node_modules/@types/geojson": { - "version": "7946.0.14", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", - "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + "version": "7946.0.15", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.15.tgz", + "integrity": "sha512-9oSxFzDCT2Rj6DfcHF8G++jxBKS7mBqXl5xrRW+Kbvjry6Uduya2iiwqHPhVXpasAVMBYKkEPGgKhd3+/HZ6xA==", + "license": "MIT" }, "node_modules/@types/geojson-vt": { "version": "3.2.5", @@ -5567,9 +5568,14 @@ } }, "node_modules/mapbox-gl": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-3.7.0.tgz", - "integrity": "sha512-dCbVyH1uGobwv6f4QKRv2Z2wuVT/RmspsudK3sTxGRFxZi6Pd2P9axdbVyZpmGddCAREy44pHhvzvO0qgpdKAg==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-3.9.1.tgz", + "integrity": "sha512-KGgS07MOoGSrewRrw0zqPG/2zkUNWYVGhI4+OEGnUGnUR5GV+k6rgKBEZei3U8z9VIrhrO5Qfbh3Da9o7GhX/Q==", + "license": "SEE LICENSE IN LICENSE.txt", + "workspaces": [ + "src/style-spec", + "test/build/typings" + ], "dependencies": { "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/mapbox-gl-supported": "^3.0.0", @@ -5578,7 +5584,7 @@ "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", - "@types/geojson": "^7946.0.14", + "@types/geojson": "^7946.0.15", "@types/geojson-vt": "^3.2.5", "@types/mapbox__point-geometry": "^0.1.4", "@types/mapbox__vector-tile": "^1.3.4", diff --git a/website/package.json b/website/package.json index 8c7baca3..8dbe9eb0 100644 --- a/website/package.json +++ b/website/package.json @@ -65,7 +65,7 @@ "immer": "^10.1.1", "lucide-static": "^0.460.0", "lucide-svelte": "^0.460.1", - "mapbox-gl": "^3.7.0", + "mapbox-gl": "^3.9.1", "mapillary-js": "^4.1.2", "mode-watcher": "^0.3.1", "png.js": "^0.2.1", diff --git a/website/src/lib/components/Map.svelte b/website/src/lib/components/Map.svelte index 75ed3e59..e9e7b999 100644 --- a/website/src/lib/components/Map.svelte +++ b/website/src/lib/components/Map.svelte @@ -50,20 +50,6 @@ language = 'en'; } - const loadJson = mapboxgl.Style.prototype._load; - mapboxgl.Style.prototype._load = function (json, validate) { - if ( - json['sources'] && - json['sources']['mapbox-satellite'] && - json['sources']['mapbox-satellite']['data'] && - json['sources']['mapbox-satellite']['data']['data'] - ) { - // Temporary fix for https://github.com/gpxstudio/gpx.studio/issues/129 - delete json['sources']['mapbox-satellite']['data']['data']; - } - loadJson.call(this, json, validate); - }; - let newMap = new mapboxgl.Map({ container: 'map', style: {