From 7d9ff41fda4ad04f0170f5ee137543342e2e6515 Mon Sep 17 00:00:00 2001 From: Chris Whong Date: Tue, 30 Jan 2024 22:13:34 -0500 Subject: [PATCH] bump mapbox gl js to v3, replace Streets with Standard --- CHANGELOG.md | 2 +- package-lock.json | 60 +++++++++++++++++++++++++++----------------- package.json | 2 +- src/constants.js | 2 +- src/ui/map/styles.js | 4 +-- 5 files changed, 42 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe840ee1..60a535960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -117,7 +117,7 @@ * Uses mapbox-gj.js for map rendering, including the new globe projection. * Adds mapbox-gl-draw with a rectangle mode and a custom edit UI/UX to be similar to the edit button in leaflet-draw * Adds a projection toggle UI (visible at zoom 6 and below) for switching between globe (default) and mercator -* Replaces the existing layer switch with more mapbox core style options (Streets, Satellite Streets, Outdoors, Light, Dark) +* Replaces the existing layer switch with more mapbox core style options (Standard, Satellite Streets, Outdoors, Light, Dark) * Formats geojson on paste (useful when pasting single-line geojson from a scripted output somewhere, if the pasted string is valid JSON it will be automatically pretty-printed in the editor) ## 2022-10-05 diff --git a/package-lock.json b/package-lock.json index 08021fc45..d9ccf8e45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "geojson-random": "0.1.0", "geojson2dsv": "0.1.0", "lodash": "^4.17.21", - "mapbox-gl": "2.13.0", + "mapbox-gl": "3.1.2", "numeral": "^2.0.6", "osmtogeojson": "3.0.0-beta.5", "polytogeojson": "0.0.1", @@ -2325,6 +2325,11 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/cheap-ruler": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/cheap-ruler/-/cheap-ruler-3.0.2.tgz", + "integrity": "sha512-02T332h1/HTN6cDSufLP8x4JzDs2+VC+8qZ/N0kWIVPyc2xUkWwWh3B2fJxR7raXkL4Mq7k554mfuM9ofv/vGg==" + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -5366,9 +5371,9 @@ "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==" }, "node_modules/kdbush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", - "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", + "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==" }, "node_modules/keyv": { "version": "4.5.0", @@ -6094,9 +6099,9 @@ } }, "node_modules/mapbox-gl": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-2.13.0.tgz", - "integrity": "sha512-G8pU1/I9HC7xNbhKPKFtRkdUDkWJBNbYPMeRjBig3lPaYtvHPIaFmXMR6BDyZ/gnwodElrwMZGdGsoH8kecX8w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-3.1.2.tgz", + "integrity": "sha512-+KoLEqZM8GxO/ViPz9tKgGURteKne+Y0pXiVCNsowymiZFH3FiL6dt9oZE95owMg5XqD3Kygz5mfchR1ZgmWlA==", "dependencies": { "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", @@ -6106,17 +6111,19 @@ "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", + "cheap-ruler": "^3.0.1", "csscolorparser": "~1.0.3", "earcut": "^2.2.4", "geojson-vt": "^3.2.1", "gl-matrix": "^3.4.3", "grid-index": "^1.1.0", + "kdbush": "^4.0.1", "murmurhash-js": "^1.0.0", "pbf": "^3.2.1", "potpack": "^2.0.0", "quickselect": "^2.0.0", "rw": "^1.3.3", - "supercluster": "^7.1.5", + "supercluster": "^8.0.0", "tinyqueue": "^2.0.3", "vt-pbf": "^3.1.3" } @@ -8912,11 +8919,11 @@ } }, "node_modules/supercluster": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-7.1.5.tgz", - "integrity": "sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", + "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", "dependencies": { - "kdbush": "^3.0.0" + "kdbush": "^4.0.2" } }, "node_modules/supports-color": { @@ -11740,6 +11747,11 @@ "supports-color": "^7.1.0" } }, + "cheap-ruler": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/cheap-ruler/-/cheap-ruler-3.0.2.tgz", + "integrity": "sha512-02T332h1/HTN6cDSufLP8x4JzDs2+VC+8qZ/N0kWIVPyc2xUkWwWh3B2fJxR7raXkL4Mq7k554mfuM9ofv/vGg==" + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -14059,9 +14071,9 @@ } }, "kdbush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", - "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", + "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==" }, "keyv": { "version": "4.5.0", @@ -14627,9 +14639,9 @@ } }, "mapbox-gl": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-2.13.0.tgz", - "integrity": "sha512-G8pU1/I9HC7xNbhKPKFtRkdUDkWJBNbYPMeRjBig3lPaYtvHPIaFmXMR6BDyZ/gnwodElrwMZGdGsoH8kecX8w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-3.1.2.tgz", + "integrity": "sha512-+KoLEqZM8GxO/ViPz9tKgGURteKne+Y0pXiVCNsowymiZFH3FiL6dt9oZE95owMg5XqD3Kygz5mfchR1ZgmWlA==", "requires": { "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", @@ -14639,17 +14651,19 @@ "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", + "cheap-ruler": "^3.0.1", "csscolorparser": "~1.0.3", "earcut": "^2.2.4", "geojson-vt": "^3.2.1", "gl-matrix": "^3.4.3", "grid-index": "^1.1.0", + "kdbush": "^4.0.1", "murmurhash-js": "^1.0.0", "pbf": "^3.2.1", "potpack": "^2.0.0", "quickselect": "^2.0.0", "rw": "^1.3.3", - "supercluster": "^7.1.5", + "supercluster": "^8.0.0", "tinyqueue": "^2.0.3", "vt-pbf": "^3.1.3" }, @@ -16748,11 +16762,11 @@ } }, "supercluster": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-7.1.5.tgz", - "integrity": "sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", + "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", "requires": { - "kdbush": "^3.0.0" + "kdbush": "^4.0.2" } }, "supports-color": { diff --git a/package.json b/package.json index 5728890fc..7764a2b63 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "geojson-random": "0.1.0", "geojson2dsv": "0.1.0", "lodash": "^4.17.21", - "mapbox-gl": "2.13.0", + "mapbox-gl": "3.1.2", "numeral": "^2.0.6", "osmtogeojson": "3.0.0-beta.5", "polytogeojson": "0.0.1", diff --git a/src/constants.js b/src/constants.js index 64864adc6..a8cd7583c 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,6 +1,6 @@ module.exports = { DEFAULT_PROJECTION: 'globe', - DEFAULT_STYLE: 'Streets', + DEFAULT_STYLE: 'Standard', DEFAULT_DARK_FEATURE_COLOR: '#555', DEFAULT_LIGHT_FEATURE_COLOR: '#e8e8e8', DEFAULT_SATELLITE_FEATURE_COLOR: '#00f900' diff --git a/src/ui/map/styles.js b/src/ui/map/styles.js index d043014ad..c70a9386e 100644 --- a/src/ui/map/styles.js +++ b/src/ui/map/styles.js @@ -1,7 +1,7 @@ module.exports = [ { - title: 'Streets', - style: 'mapbox://styles/mapbox/streets-v12' + title: 'Standard', + style: 'mapbox://styles/mapbox/standard' }, { title: 'Satellite Streets',