Skip to content

🎥 Make videos programmatically with React

Migrate MapLibre to v6 and update map examples

JonnyBurger454f0bfc7461
diff --git a/bun.lock b/bun.lock
index b87be45c25..9181ecab41 100644
--- a/bun.lock
+++ b/bun.lock
@@ -611,7 +611,7 @@
"hls.js": "0.14.17",
"https-proxy-agent": "7.0.6",
"lottie-web": "5.13.0",
- "maplibre-gl": "5.24.0",
+ "maplibre-gl": "6.4.1",
"mediabunny": "catalog:",
"mux-embed": "4.30.0",
"next": "catalog:",
@@ -3937,19 +3937,19 @@
"@mapbox/tiny-sdf": ["@mapbox/[email protected]", "", {}, "sha512-LVL4wgI9YAum5V+LNVQO6QgFBPw7/MIIY4XJPNsPDMrjEwcE+JfKk1LuIl8GnF197ejVdC9QdPaxrx5gfgdGXg=="],
- "@mapbox/unitbezier": ["@mapbox/[email protected]", "", {}, "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw=="],
+ "@mapbox/unitbezier": ["@mapbox/[email protected]", "", {}, "sha512-fqd515fjBmANKGGsQ286E2Wvj/XvDFpGzwJxq4CI6jMQue6Oy04uCKp+JWKF00xRTmk6cEu1jPJ9p3xqH8YWqQ=="],
- "@mapbox/vector-tile": ["@mapbox/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "~1.1.0", "@types/geojson": "^7946.0.16", "pbf": "^4.0.1" } }, "sha512-AkOLcbgGTdXScosBWwmmD7cDlvOjkg/DetGva26pIRiZPdeJYjYKarIlb4uxVzi6bwHO6EWH82eZ5Nuv4T5DUg=="],
+ "@mapbox/vector-tile": ["@mapbox/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "~1.1.0", "@types/geojson": "^7946.0.16", "pbf": "^5.0.0" } }, "sha512-Qf10S1uIHMk20ri/IVBnpS+esUEkVaR5Hftmz88jTInrpmWgPGJfPe3LVjjlE77trLx8tH6qjTG7uWH9hIq/0Q=="],
"@mapbox/whoots-js": ["@mapbox/[email protected]", "", {}, "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q=="],
- "@maplibre/geojson-vt": ["@maplibre/[email protected]", "", { "dependencies": { "kdbush": "^4.0.2" } }, "sha512-2eIY4gZxeKIVOZVNkAMb+5NgXhgsMQpOveTQAvnp53LYqHGJZDidk7Ew0Tged9PThidpbS+NFTh0g4zivhPDzQ=="],
+ "@maplibre/geojson-vt": ["@maplibre/[email protected]", "", { "dependencies": { "kdbush": "^4.1.0" } }, "sha512-FVMOcmSP/yqol45t7StApEyTL5/vmqBCuFhH9n+fFuINenhaX+YgHHIt1yJ86S8kln3uJLcMvmEU2cfn6E2eCQ=="],
"@maplibre/maplibre-gl-style-spec": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/unitbezier": "^0.0.1", "json-stringify-pretty-compact": "^4.0.0", "minimist": "^1.2.8", "quickselect": "^3.0.0", "tinyqueue": "^3.0.0" }, "bin": { "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs", "gl-style-format": "dist/gl-style-format.mjs" } }, "sha512-EzEJmMt6thioRH7GI9LWS7ahXTcAhAPGWCe6oTP2Ps4YnsXOOAfeqx854lZaiDnwURfHmcCKV1mr6oo0i23x6w=="],
- "@maplibre/mlt": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0" } }, "sha512-g/tD8EYJB97udq33ipuJ9a4Q7fcbZnTEnUrgnEc/tLMmEL+zaCbR+X5fkDBO2dgpaAMsLH179qE3UXg2N0Nc/g=="],
+ "@maplibre/mlt": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0" } }, "sha512-5n5dgolE2EYxwCKgx8vlwURCB8A+kyfJJyThlYimjlGgOcOe2Bhw9VxxnnHC91OC9PgHg+nVdgVPTYPkIo62vg=="],
- "@maplibre/vt-pbf": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0", "@mapbox/vector-tile": "^2.0.4", "@maplibre/geojson-vt": "^5.0.4", "@types/geojson": "^7946.0.16", "@types/supercluster": "^7.1.3", "pbf": "^4.0.1", "supercluster": "^8.0.1" } }, "sha512-jIvp8F5hQCcreqOOpEt42TJMUlsrEcpf/kI1T2v85YrQRV6PPXUcEXUg5karKtH6oh47XJZ4kHu56pUkOuqA7w=="],
+ "@maplibre/vt-pbf": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0", "@types/geojson": "^7946.0.16", "pbf": "^5.1.0" } }, "sha512-j6p0AdjvAR19Z3XaCysle7A4ZSo08tYOzxD0Y9NQylwPAkwJJeYub5b2eVucdeDh7erhv69DahoLOevDRERRUw=="],
"@maptiler/client": ["@maptiler/[email protected]", "", { "dependencies": { "quick-lru": "^7.0.0" } }, "sha512-zSM5kC/CX02kgpRHQxxKOzjaQjNBs8hqQueIJqwT9pzB2vsP9FTFHfnVrGCfUwM+s1n2bdGla+2hibPkVUf0fw=="],
@@ -6351,7 +6351,7 @@
"duplexify": ["[email protected]", "", { "dependencies": { "end-of-stream": "1.4.4", "inherits": "2.0.4", "readable-stream": "3.6.0", "stream-shift": "1.0.3" } }, "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA=="],
- "earcut": ["[email protected]", "", {}, "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ=="],
+ "earcut": ["[email protected]", "", {}, "sha512-vnS4AVwp1KHAF13i1vp1/2D5evWy3k5u/iW/B81QVsUZtV8cv2tU0b2VNFlqvh4kYwrFMDdjPCfAmfyJW9y14Q=="],
"eastasianwidth": ["[email protected]", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
@@ -7149,7 +7149,7 @@
"jws": ["[email protected]", "", { "dependencies": { "jwa": "2.0.0", "safe-buffer": "5.2.1" } }, "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg=="],
- "kdbush": ["[email protected]", "", {}, "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="],
+ "kdbush": ["[email protected]", "", {}, "sha512-e9vurzrXJQrFX6ckpHP3bvj5l+9CnYzkxDNnNQ1h2QTqdWsUAJgXiKdGNcOa1EY85dU8KbQ+z/FdQdB7P+9yfQ=="],
"keyv": ["[email protected]", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
@@ -7303,7 +7303,7 @@
"map-age-cleaner": ["[email protected]", "", { "dependencies": { "p-defer": "^1.0.0" } }, "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w=="],
- "maplibre-gl": ["[email protected]", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/point-geometry": "^1.1.0", "@mapbox/tiny-sdf": "^2.1.0", "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^2.0.4", "@mapbox/whoots-js": "^3.1.0", "@maplibre/geojson-vt": "^6.1.0", "@maplibre/maplibre-gl-style-spec": "^24.8.1", "@maplibre/mlt": "^1.1.8", "@maplibre/vt-pbf": "^4.3.0", "@types/geojson": "^7946.0.16", "earcut": "^3.0.2", "gl-matrix": "^3.4.4", "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^4.0.1", "potpack": "^2.1.0", "quickselect": "^3.0.0", "tinyqueue": "^3.0.0" } }, "sha512-ALyFxgtd5R+65UqZ/++lOqwWcC0SNho9c27fYSyLmG7AfnAul2o46F05aDJGPbFU57wos9dgcIySHs0Xe6ia3A=="],
+ "maplibre-gl": ["[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0", "@mapbox/tiny-sdf": "^2.2.0", "@mapbox/unitbezier": "^1.0.0", "@mapbox/vector-tile": "^3.0.0", "@maplibre/geojson-vt": "^6.1.1", "@maplibre/maplibre-gl-style-spec": "^26.2.1", "@maplibre/mlt": "^1.1.12", "@maplibre/vt-pbf": "^4.3.2", "@types/geojson": "^7946.0.16", "earcut": "^3.2.3", "gl-matrix": "^3.4.4", "kdbush": "^4.1.0", "murmurhash-js": "^1.0.0", "pbf": "^5.1.2", "potpack": "^2.1.0", "quickselect": "^3.0.0", "tinyqueue": "^3.0.0" } }, "sha512-KzxQKtfBu/pSz1C+yW1hNS9eyj2h2lC7ufdAi6/SEt177n3oAfDfmUmslRfJdXY7ReAFBcnvwsqmiyoDhtA9GQ=="],
"markdown-extensions": ["[email protected]", "", {}, "sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q=="],
@@ -7773,7 +7773,7 @@
"pathe": ["[email protected]", "", {}, "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ=="],
- "pbf": ["[email protected]", "", { "dependencies": { "resolve-protobuf-schema": "^2.1.0" }, "bin": { "pbf": "bin/pbf" } }, "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA=="],
+ "pbf": ["[email protected]", "", { "dependencies": { "resolve-protobuf-schema": "^2.1.0" }, "bin": { "pbf": "bin/pbf" } }, "sha512-mnvGdvOrIvJOBGUEdGkrVXjN8E/VkIJCkf2eS1DH2yv82ORUlLttmDt0rWY38yYZmVwciZwBUvHM20qxBZf40w=="],
"pe-library": ["[email protected]", "", {}, "sha512-nh39Mo1eGWmZS7y+mK/dQIqg7S1lp38DpRxkyoHf0ZcUs/HDc+yyTjuOtTvSMZHmfSLuSQaX945u05Y2Q6UWZg=="],
@@ -10155,9 +10155,9 @@
"@listr2/prompt-adapter-inquirer/@inquirer/type": ["@inquirer/[email protected]", "", { "dependencies": { "mute-stream": "^1.0.0" } }, "sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA=="],
- "@maplibre/maplibre-gl-style-spec/minimist": ["[email protected]", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
+ "@maplibre/maplibre-gl-style-spec/@mapbox/unitbezier": ["@mapbox/[email protected]", "", {}, "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw=="],
- "@maplibre/vt-pbf/@maplibre/geojson-vt": ["@maplibre/[email protected]", "", {}, "sha512-KGg9sma45S+stfH9vPCJk1J0lSDLWZgCT9Y8u8qWZJyjFlP8MNP1WGTxIMYJZjDvVT3PDn05kN1C95Sut1HpgQ=="],
+ "@maplibre/maplibre-gl-style-spec/minimist": ["[email protected]", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
"@maptiler/sdk/maplibre-gl": ["[email protected]", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/point-geometry": "^1.1.0", "@mapbox/tiny-sdf": "^2.0.7", "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^2.0.4", "@mapbox/whoots-js": "^3.1.0", "@maplibre/geojson-vt": "^6.0.4", "@maplibre/maplibre-gl-style-spec": "^24.7.0", "@maplibre/mlt": "^1.1.8", "@maplibre/vt-pbf": "^4.3.0", "@types/geojson": "^7946.0.16", "earcut": "^3.0.2", "gl-matrix": "^3.4.4", "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^4.0.1", "potpack": "^2.1.0", "quickselect": "^3.0.0", "tinyqueue": "^3.0.0" } }, "sha512-zto1RTnFkOpOO1bm93ElCXF1huey2N4LvXaGLMFcYAu9txh0OhGIdX1q3LZLkrMKgMxMeYduaQo+DVNzg098fg=="],
@@ -11067,6 +11067,8 @@
"@turf/clusters/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
+ "@turf/clusters-dbscan/kdbush": ["[email protected]", "", {}, "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="],
+
"@turf/clusters-dbscan/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
"@turf/clusters-kmeans/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
@@ -11965,6 +11967,8 @@
"make-fetch-happen/ssri": ["[email protected]", "", { "dependencies": { "minipass": "^3.1.1" } }, "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q=="],
+ "maplibre-gl/@maplibre/maplibre-gl-style-spec": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "^2.0.3", "@mapbox/unitbezier": "^1.0.0", "json-stringify-pretty-compact": "^4.0.0", "minimist": "^1.2.8", "quickselect": "^3.0.0", "tinyqueue": "^3.0.0" }, "bin": { "gl-style-format": "dist/gl-style-format.mjs", "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs" } }, "sha512-6J0vZqMZvRAJKtdWJdDGHEh1YJ2ZHG08/GOur8gCArYhO8ZkM//OXqtI2AAEz4jc2G+Wq4MfcePg8qNK5TZ4Kg=="],
+
"mdast-util-definitions/@types/unist": ["@types/[email protected]", "", {}, "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ=="],
"mdast-util-definitions/unist-util-visit": ["[email protected]", "", { "dependencies": { "@types/unist": "3.0.2", "unist-util-is": "6.0.0", "unist-util-visit-parents": "6.0.1" } }, "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg=="],
@@ -12639,6 +12643,8 @@
"sumchecker/debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
+ "supercluster/kdbush": ["[email protected]", "", {}, "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="],
+
"suspend-react/react": ["[email protected]", "", {}, "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ=="],
"svgo/commander": ["[email protected]", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="],
@@ -15679,6 +15685,22 @@
"@listr2/prompt-adapter-inquirer/@inquirer/type/mute-stream": ["[email protected]", "", {}, "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA=="],
+ "@maptiler/sdk/maplibre-gl/@mapbox/unitbezier": ["@mapbox/[email protected]", "", {}, "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw=="],
+
+ "@maptiler/sdk/maplibre-gl/@mapbox/vector-tile": ["@mapbox/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "~1.1.0", "@types/geojson": "^7946.0.16", "pbf": "^4.0.1" } }, "sha512-AkOLcbgGTdXScosBWwmmD7cDlvOjkg/DetGva26pIRiZPdeJYjYKarIlb4uxVzi6bwHO6EWH82eZ5Nuv4T5DUg=="],
+
+ "@maptiler/sdk/maplibre-gl/@maplibre/geojson-vt": ["@maplibre/[email protected]", "", { "dependencies": { "kdbush": "^4.0.2" } }, "sha512-2eIY4gZxeKIVOZVNkAMb+5NgXhgsMQpOveTQAvnp53LYqHGJZDidk7Ew0Tged9PThidpbS+NFTh0g4zivhPDzQ=="],
+
+ "@maptiler/sdk/maplibre-gl/@maplibre/mlt": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0" } }, "sha512-g/tD8EYJB97udq33ipuJ9a4Q7fcbZnTEnUrgnEc/tLMmEL+zaCbR+X5fkDBO2dgpaAMsLH179qE3UXg2N0Nc/g=="],
+
+ "@maptiler/sdk/maplibre-gl/@maplibre/vt-pbf": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0", "@mapbox/vector-tile": "^2.0.4", "@maplibre/geojson-vt": "^5.0.4", "@types/geojson": "^7946.0.16", "@types/supercluster": "^7.1.3", "pbf": "^4.0.1", "supercluster": "^8.0.1" } }, "sha512-jIvp8F5hQCcreqOOpEt42TJMUlsrEcpf/kI1T2v85YrQRV6PPXUcEXUg5karKtH6oh47XJZ4kHu56pUkOuqA7w=="],
+
+ "@maptiler/sdk/maplibre-gl/earcut": ["[email protected]", "", {}, "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ=="],
+
+ "@maptiler/sdk/maplibre-gl/kdbush": ["[email protected]", "", {}, "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="],
+
+ "@maptiler/sdk/maplibre-gl/pbf": ["[email protected]", "", { "dependencies": { "resolve-protobuf-schema": "^2.1.0" }, "bin": { "pbf": "bin/pbf" } }, "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA=="],
+
"@mdx-js/loader/webpack/@webassemblyjs/ast": ["@webassemblyjs/[email protected]", "", { "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg=="],
"@mdx-js/loader/webpack/@webassemblyjs/wasm-edit": ["@webassemblyjs/[email protected]", "", { "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/helper-wasm-section": "1.12.1", "@webassemblyjs/wasm-gen": "1.12.1", "@webassemblyjs/wasm-opt": "1.12.1", "@webassemblyjs/wasm-parser": "1.12.1", "@webassemblyjs/wast-printer": "1.12.1" } }, "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g=="],
@@ -17349,6 +17371,10 @@
"make-fetch-happen/socks-proxy-agent/debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
+ "maplibre-gl/@maplibre/maplibre-gl-style-spec/@mapbox/jsonlint-lines-primitives": ["@mapbox/[email protected]", "", {}, "sha512-0SElaV0uMxEnxzBhhX9WTuPyUeMsAN/SS0i16tjuba4/mio63MG9khjC1a0JAiPGXAwvwm4UfHJURCN7nyudQg=="],
+
+ "maplibre-gl/@maplibre/maplibre-gl-style-spec/minimist": ["[email protected]", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
+
"mdast-util-frontmatter/@types/mdast/@types/unist": ["@types/[email protected]", "", {}, "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ=="],
"mdast-util-frontmatter/mdast-util-to-markdown/@types/unist": ["@types/[email protected]", "", {}, "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ=="],
@@ -22629,6 +22655,8 @@
"@inquirer/select/@inquirer/core/wrap-ansi/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "8.0.0", "is-fullwidth-code-point": "3.0.0", "strip-ansi": "6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+ "@maptiler/sdk/maplibre-gl/@maplibre/vt-pbf/@maplibre/geojson-vt": ["@maplibre/[email protected]", "", {}, "sha512-KGg9sma45S+stfH9vPCJk1J0lSDLWZgCT9Y8u8qWZJyjFlP8MNP1WGTxIMYJZjDvVT3PDn05kN1C95Sut1HpgQ=="],
+
"@mdx-js/loader/webpack/@webassemblyjs/ast/@webassemblyjs/helper-numbers": ["@webassemblyjs/[email protected]", "", { "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g=="],
"@mdx-js/loader/webpack/@webassemblyjs/ast/@webassemblyjs/helper-wasm-bytecode": ["@webassemblyjs/[email protected]", "", {}, "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA=="],
diff --git a/packages/codex-plugin/skills/remotion-best-practices/remotion-maps/techniques/maplibre/TECHNIQUE.md b/packages/codex-plugin/skills/remotion-best-practices/remotion-maps/techniques/maplibre/TECHNIQUE.md
index 7d01cff110..5a4e02db5a 100644
--- a/packages/codex-plugin/skills/remotion-best-practices/remotion-maps/techniques/maplibre/TECHNIQUE.md
+++ b/packages/codex-plugin/skills/remotion-best-practices/remotion-maps/techniques/maplibre/TECHNIQUE.md
@@ -58,12 +58,16 @@ Import the MapLibre CSS once in the component or an app-level stylesheet:
import 'maplibre-gl/dist/maplibre-gl.css';
```
+MapLibre v6 requires WebGL2. Configure its worker before creating a map. The examples below load the worker from unpkg, using the installed MapLibre version. A same-origin Blob imports the CDN worker to avoid Webpack rewriting MapLibre's cross-origin URL handling.
+
+To serve the worker locally, copy the worker and its imported modules into your public directory and pass the worker URL to `setWorkerUrl()`.
+
## Basic map example
```tsx
import {useEffect, useRef, useState} from 'react';
import {AbsoluteFill, useDelayRender, useVideoConfig} from 'remotion';
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -79,6 +83,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
@@ -131,7 +144,8 @@ import {
useDelayRender,
useVideoConfig,
} from 'remotion';
-import maplibregl, {type GeoJSONSource, type Map} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type GeoJSONSource, type Map} from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -214,6 +228,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
diff --git a/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md b/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md
index 7d01cff110..5a4e02db5a 100644
--- a/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md
+++ b/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md
@@ -58,12 +58,16 @@ Import the MapLibre CSS once in the component or an app-level stylesheet:
import 'maplibre-gl/dist/maplibre-gl.css';
```
+MapLibre v6 requires WebGL2. Configure its worker before creating a map. The examples below load the worker from unpkg, using the installed MapLibre version. A same-origin Blob imports the CDN worker to avoid Webpack rewriting MapLibre's cross-origin URL handling.
+
+To serve the worker locally, copy the worker and its imported modules into your public directory and pass the worker URL to `setWorkerUrl()`.
+
## Basic map example
```tsx
import {useEffect, useRef, useState} from 'react';
import {AbsoluteFill, useDelayRender, useVideoConfig} from 'remotion';
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -79,6 +83,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
@@ -131,7 +144,8 @@ import {
useDelayRender,
useVideoConfig,
} from 'remotion';
-import maplibregl, {type GeoJSONSource, type Map} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type GeoJSONSource, type Map} from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -214,6 +228,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
diff --git a/packages/codex-plugin/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md b/packages/codex-plugin/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md
index 7d01cff110..5a4e02db5a 100644
--- a/packages/codex-plugin/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md
+++ b/packages/codex-plugin/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md
@@ -58,12 +58,16 @@ Import the MapLibre CSS once in the component or an app-level stylesheet:
import 'maplibre-gl/dist/maplibre-gl.css';
```
+MapLibre v6 requires WebGL2. Configure its worker before creating a map. The examples below load the worker from unpkg, using the installed MapLibre version. A same-origin Blob imports the CDN worker to avoid Webpack rewriting MapLibre's cross-origin URL handling.
+
+To serve the worker locally, copy the worker and its imported modules into your public directory and pass the worker URL to `setWorkerUrl()`.
+
## Basic map example
```tsx
import {useEffect, useRef, useState} from 'react';
import {AbsoluteFill, useDelayRender, useVideoConfig} from 'remotion';
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -79,6 +83,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
@@ -131,7 +144,8 @@ import {
useDelayRender,
useVideoConfig,
} from 'remotion';
-import maplibregl, {type GeoJSONSource, type Map} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type GeoJSONSource, type Map} from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -214,6 +228,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
diff --git a/packages/codex-plugin/skills/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md b/packages/codex-plugin/skills/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md
index 7d01cff110..5a4e02db5a 100644
--- a/packages/codex-plugin/skills/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md
+++ b/packages/codex-plugin/skills/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md
@@ -58,12 +58,16 @@ Import the MapLibre CSS once in the component or an app-level stylesheet:
import 'maplibre-gl/dist/maplibre-gl.css';
```
+MapLibre v6 requires WebGL2. Configure its worker before creating a map. The examples below load the worker from unpkg, using the installed MapLibre version. A same-origin Blob imports the CDN worker to avoid Webpack rewriting MapLibre's cross-origin URL handling.
+
+To serve the worker locally, copy the worker and its imported modules into your public directory and pass the worker URL to `setWorkerUrl()`.
+
## Basic map example
```tsx
import {useEffect, useRef, useState} from 'react';
import {AbsoluteFill, useDelayRender, useVideoConfig} from 'remotion';
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -79,6 +83,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
@@ -131,7 +144,8 @@ import {
useDelayRender,
useVideoConfig,
} from 'remotion';
-import maplibregl, {type GeoJSONSource, type Map} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type GeoJSONSource, type Map} from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -214,6 +228,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
diff --git a/packages/docs/docs/maps.mdx b/packages/docs/docs/maps.mdx
index feac5785dc..cfe66686ce 100644
--- a/packages/docs/docs/maps.mdx
+++ b/packages/docs/docs/maps.mdx
@@ -22,6 +22,10 @@ Import the MapLibre stylesheet once, either in the component that renders the ma
import 'maplibre-gl/dist/maplibre-gl.css';
```
+MapLibre v6 requires WebGL2. Configure its worker before creating a map. The examples below load the worker from unpkg, using the installed MapLibre version. A same-origin Blob imports the CDN worker to avoid Webpack rewriting MapLibre's cross-origin URL handling.
+
+To serve the worker locally, copy the worker and its imported modules into your [public directory](/docs/staticfile) and pass the worker URL to `setWorkerUrl()`.
+
## Adding a map
Use [`useDelayRender()`](/docs/use-delay-render) to wait for the map to load. The container element must have explicit dimensions and `position: "absolute"`.
@@ -29,7 +33,7 @@ Use [`useDelayRender()`](/docs/use-delay-render) to wait for the map to load. Th
```tsx twoslash
import {useEffect, useRef, useState} from 'react';
import {AbsoluteFill, useDelayRender, useVideoConfig} from 'remotion';
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -45,6 +49,15 @@ export const MapComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const map = new maplibregl.Map({
container: ref.current,
style: 'https://demotiles.maplibre.org/style.json',
@@ -81,8 +94,17 @@ For Remotion renders, do not add a `map.remove()` cleanup function. It can inter
Use any valid MapLibre style JSON URL. The stock demo style works as a simple default:
```tsx twoslash
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
// ---cut---
+maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+);
+
const map = new maplibregl.Map({
container: document.createElement('div'),
style: 'https://demotiles.maplibre.org/style.json',
@@ -100,7 +122,7 @@ If you need a custom look, prefer changing your own GeoJSON layers first. Only e
Add a GeoJSON line source and layer:
```tsx twoslash
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
const map = {} as maplibregl.Map;
const lineCoordinates: [number, number][] = [
[0, 0],
@@ -170,7 +192,8 @@ const slicedLine = turf.lineSliceAlong(route, 0, currentDistance);
Update the GeoJSON source for the current frame:
```tsx twoslash
-import maplibregl, {type GeoJSONSource} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type GeoJSONSource} from 'maplibre-gl';
import * as turf from '@turf/turf';
const map = {} as maplibregl.Map | null;
@@ -194,7 +217,8 @@ import {useEffect} from 'react';
import * as turf from '@turf/turf';
import {useCurrentFrame, useVideoConfig, useDelayRender} from 'remotion';
import {interpolate, Easing} from 'remotion';
-import maplibregl, {type Map} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type Map} from 'maplibre-gl';
const map = {} as Map | null;
const targetRoute = turf.lineString([
@@ -249,7 +273,7 @@ Add circle markers with labels as map-native GeoJSON layers:
```tsx twoslash
import * as turf from '@turf/turf';
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
const map = {} as maplibregl.Map;
const LA_COORDS: [number, number] = [-118.2437, 34.0522];
// ---cut---
diff --git a/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsx b/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsx
index 53658a1bb9..e467800e95 100644
--- a/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsx
+++ b/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsx
@@ -1,5 +1,6 @@
import * as turf from '@turf/turf';
-import maplibregl, {type Map} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type Map} from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
import React, {
forwardRef,
@@ -408,6 +409,18 @@ const MapFlyoverLayerInner = forwardRef<
return;
}
+ // Keep the worker URL same-origin so Webpack does not rewrite it.
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [
+ `import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`,
+ ],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: mapContainerRef.current,
style: {
diff --git a/packages/docs/src/components/Elements/element-definitions.ts b/packages/docs/src/components/Elements/element-definitions.ts
index ce0804afc3..3d412fe683 100644
--- a/packages/docs/src/components/Elements/element-definitions.ts
+++ b/packages/docs/src/components/Elements/element-definitions.ts
@@ -188,7 +188,7 @@ const elementImplementations = {
'An animated map flyover from point A to point B, with editable coordinates, location labels, and a camera that follows the route.',
dependencies: [
{name: '@turf/turf', version: '7.3.2'},
- {name: 'maplibre-gl', version: '5.24.0'},
+ {name: 'maplibre-gl', version: '6.4.1'},
],
durationInFrames: 285,
elementHeight: null,
diff --git a/packages/skills/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md b/packages/skills/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md
index 7d01cff110..5a4e02db5a 100644
--- a/packages/skills/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md
+++ b/packages/skills/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md
@@ -58,12 +58,16 @@ Import the MapLibre CSS once in the component or an app-level stylesheet:
import 'maplibre-gl/dist/maplibre-gl.css';
```
+MapLibre v6 requires WebGL2. Configure its worker before creating a map. The examples below load the worker from unpkg, using the installed MapLibre version. A same-origin Blob imports the CDN worker to avoid Webpack rewriting MapLibre's cross-origin URL handling.
+
+To serve the worker locally, copy the worker and its imported modules into your public directory and pass the worker URL to `setWorkerUrl()`.
+
## Basic map example
```tsx
import {useEffect, useRef, useState} from 'react';
import {AbsoluteFill, useDelayRender, useVideoConfig} from 'remotion';
-import maplibregl from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -79,6 +83,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',
@@ -131,7 +144,8 @@ import {
useDelayRender,
useVideoConfig,
} from 'remotion';
-import maplibregl, {type GeoJSONSource, type Map} from 'maplibre-gl';
+import * as maplibregl from 'maplibre-gl';
+import {type GeoJSONSource, type Map} from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const zurich: [number, number] = [8.5417, 47.3769];
@@ -214,6 +228,15 @@ export const MyComposition = () => {
return;
}
+ maplibregl.setWorkerUrl(
+ URL.createObjectURL(
+ new Blob(
+ [`import "https://unpkg.com/maplibre-gl@${maplibregl.getVersion()}/dist/maplibre-gl-worker.mjs";`],
+ {type: 'text/javascript'},
+ ),
+ ),
+ );
+
const mapInstance = new maplibregl.Map({
container: containerRef.current,
style: 'https://demotiles.maplibre.org/style.json',