From 3744d893bbb0be701fba3c9681840f45afb0b7b0 Mon Sep 17 00:00:00 2001 From: felixpalmer Date: Thu, 16 Jan 2025 11:57:43 +0100 Subject: [PATCH] website: only use maplibre v5 on Maplibre example (#9354) --- examples/website/maplibre/app.tsx | 5 +-- examples/website/maplibre/package.json | 3 +- website/package.json | 3 +- website/yarn.lock | 44 +++++++++++++++++++++++--- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/examples/website/maplibre/app.tsx b/examples/website/maplibre/app.tsx index b111c013614..bf11a4f58c2 100644 --- a/examples/website/maplibre/app.tsx +++ b/examples/website/maplibre/app.tsx @@ -4,11 +4,12 @@ import React from 'react'; import {useState, useCallback, useEffect} from 'react'; -import maplibregl from 'maplibre-gl/dist/maplibre-gl-dev'; +// TODO remove alias from package.json once v5 available via react-map-gl +import maplibregl from 'maplibre-gl-v5/dist/maplibre-gl-dev'; +import 'maplibre-gl-v5/dist/maplibre-gl.css'; import {Map, useControl, useMap} from '@vis.gl/react-maplibre'; import type {ViewState} from '@vis.gl/react-maplibre'; import {MapboxOverlay as DeckOverlay} from '@deck.gl/mapbox'; -import 'maplibre-gl/dist/maplibre-gl.css'; import {createRoot} from 'react-dom/client'; import {load} from '@loaders.gl/core'; diff --git a/examples/website/maplibre/package.json b/examples/website/maplibre/package.json index ff5104eaa09..26d30b0a40f 100644 --- a/examples/website/maplibre/package.json +++ b/examples/website/maplibre/package.json @@ -15,7 +15,8 @@ "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "deck.gl": "^9.0.0", - "maplibre-gl": "^5.0.1", + "maplibre-gl": "^3.0.0", + "maplibre-gl-v5": "npm:maplibre-gl@^5.0.1", "react": "^18.0.0", "react-dom": "^18.0.0", "@vis.gl/react-maplibre": "^1.0.0-alpha.5" diff --git a/website/package.json b/website/package.json index 859d92cdedc..7c8d0188764 100644 --- a/website/package.json +++ b/website/package.json @@ -32,7 +32,8 @@ "d3-scale": "^4.0.0", "expr-eval": "^2.0.2", "mapbox-gl": "^3.0.0", - "maplibre-gl": "^5.0.1", + "maplibre-gl": "^3.0.0", + "maplibre-gl-v5": "npm:maplibre-gl@^5.0.1", "popmotion": "^11.0.0", "react": "^18.0.0", "react-ace": "^6.1.4", diff --git a/website/yarn.lock b/website/yarn.lock index 330e56510fa..70bb07382c9 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -2300,7 +2300,7 @@ resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe" integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q== -"@maplibre/maplibre-gl-style-spec@^19.2.1": +"@maplibre/maplibre-gl-style-spec@^19.2.1", "@maplibre/maplibre-gl-style-spec@^19.3.3": version "19.3.3" resolved "https://registry.yarnpkg.com/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.3.3.tgz#a106248bd2e25e77c963a362aeaf630e00f924e9" integrity sha512-cOZZOVhDSulgK0meTsTkmNXb1ahVvmTmWmfx9gRBwc6hq98wS9JP35ESIoNq3xqEan+UN+gn8187Z6E4NKhLsw== @@ -4026,7 +4026,7 @@ resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.8.tgz#30744afdb385e2945e22f3b033f897f76b1f12ca" integrity sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA== -"@types/geojson@^7946.0.15": +"@types/geojson@^7946.0.13", "@types/geojson@^7946.0.15": version "7946.0.15" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.15.tgz#f9d55fd5a0aa2de9dc80b1b04e437538b7298868" integrity sha512-9oSxFzDCT2Rj6DfcHF8G++jxBKS7mBqXl5xrRW+Kbvjry6Uduya2iiwqHPhVXpasAVMBYKkEPGgKhd3+/HZ6xA== @@ -5959,7 +5959,7 @@ duplexer@^0.1.2: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -earcut@^2.0.0: +earcut@^2.0.0, earcut@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a" integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ== @@ -6575,6 +6575,11 @@ geojson-rbush@3.x: "@types/geojson" "7946.0.8" rbush "^3.0.1" +geojson-vt@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/geojson-vt/-/geojson-vt-3.2.1.tgz#f8adb614d2c1d3f6ee7c4265cad4bbf3ad60c8b7" + integrity sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg== + geojson-vt@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/geojson-vt/-/geojson-vt-4.0.2.tgz#1162f6c7d61a0ba305b1030621e6e111f847828a" @@ -7906,7 +7911,7 @@ mapbox-gl@^3.0.0: tinyqueue "^3.0.0" vt-pbf "^3.1.3" -maplibre-gl@^5.0.1: +"maplibre-gl-v5@npm:maplibre-gl@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/maplibre-gl/-/maplibre-gl-5.0.1.tgz#5eeb520de26dca820a12f270164c5eb5db1d16e2" integrity sha512-kNvod1Tq0BcZvn43UAciA3DrzaEGmowqMoI6nh3kUo9rf+7m89mFJI9dELxkWzJ/N9Pgnkp7xF1jzTP08PGpCw== @@ -7938,6 +7943,37 @@ maplibre-gl@^5.0.1: tinyqueue "^3.0.0" vt-pbf "^3.1.3" +maplibre-gl@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/maplibre-gl/-/maplibre-gl-3.6.2.tgz#abc2f34bddecabef8c20028eff06d62e36d75ccc" + integrity sha512-krg2KFIdOpLPngONDhP6ixCoWl5kbdMINP0moMSJFVX7wX1Clm2M9hlNKXS8vBGlVWwR5R3ZfI6IPrYz7c+aCQ== + dependencies: + "@mapbox/geojson-rewind" "^0.5.2" + "@mapbox/jsonlint-lines-primitives" "^2.0.2" + "@mapbox/point-geometry" "^0.1.0" + "@mapbox/tiny-sdf" "^2.0.6" + "@mapbox/unitbezier" "^0.0.1" + "@mapbox/vector-tile" "^1.3.1" + "@mapbox/whoots-js" "^3.1.0" + "@maplibre/maplibre-gl-style-spec" "^19.3.3" + "@types/geojson" "^7946.0.13" + "@types/mapbox__point-geometry" "^0.1.4" + "@types/mapbox__vector-tile" "^1.3.4" + "@types/pbf" "^3.0.5" + "@types/supercluster" "^7.1.3" + earcut "^2.2.4" + geojson-vt "^3.2.1" + gl-matrix "^3.4.3" + global-prefix "^3.0.0" + kdbush "^4.0.2" + murmurhash-js "^1.0.0" + pbf "^3.2.1" + potpack "^2.0.0" + quickselect "^2.0.0" + supercluster "^8.0.1" + tinyqueue "^2.0.3" + vt-pbf "^3.1.3" + markdown-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-2.0.0.tgz#34bebc83e9938cae16e0e017e4a9814a8330d3c4"