mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Maps] Replace mapbox-gl import with MapLibre (#104505)
* replace import * fix import * upgrade * Update packages/kbn-mapbox-gl/BUILD.bazel Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> * Update package.json Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> * commit yarn lock * yarn lock Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
This commit is contained in:
parent
57dc0c1ff5
commit
ffc45c3cab
5 changed files with 17 additions and 25 deletions
|
@ -287,7 +287,7 @@
|
|||
"lodash": "^4.17.21",
|
||||
"lru-cache": "^4.1.5",
|
||||
"lz-string": "^1.4.4",
|
||||
"mapbox-gl": "1.13.1",
|
||||
"maplibre-gl": "1.15.2",
|
||||
"mapbox-gl-draw-rectangle-mode": "1.0.4",
|
||||
"markdown-it": "^10.0.0",
|
||||
"md5": "^2.1.0",
|
||||
|
@ -572,7 +572,6 @@
|
|||
"@types/lodash": "^4.14.159",
|
||||
"@types/lru-cache": "^5.1.0",
|
||||
"@types/lz-string": "^1.3.34",
|
||||
"@types/mapbox-gl": "1.13.1",
|
||||
"@types/markdown-it": "^0.0.7",
|
||||
"@types/md5": "^2.2.0",
|
||||
"@types/memoize-one": "^4.1.0",
|
||||
|
|
|
@ -30,13 +30,13 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
RUNTIME_DEPS = [
|
||||
"@npm//@mapbox/mapbox-gl-rtl-text",
|
||||
"@npm//file-loader",
|
||||
"@npm//mapbox-gl",
|
||||
"@npm//maplibre-gl",
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@mapbox/mapbox-gl-rtl-text",
|
||||
"@npm//file-loader",
|
||||
"@npm//@types/mapbox-gl",
|
||||
"@npm//maplibre-gl",
|
||||
]
|
||||
|
||||
jsts_transpiler(
|
||||
|
|
|
@ -24,13 +24,13 @@ import type {
|
|||
MapboxGeoJSONFeature,
|
||||
Point,
|
||||
CustomLayerInterface,
|
||||
} from 'mapbox-gl';
|
||||
import mapboxgl from 'mapbox-gl/dist/mapbox-gl-csp';
|
||||
} from 'maplibre-gl';
|
||||
import mapboxgl from 'maplibre-gl/dist/maplibre-gl-csp';
|
||||
// @ts-expect-error
|
||||
import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js';
|
||||
// @ts-expect-error
|
||||
import mbWorkerUrl from '!!file-loader!mapbox-gl/dist/mapbox-gl-csp-worker';
|
||||
import 'mapbox-gl/dist/mapbox-gl.css';
|
||||
import mbWorkerUrl from '!!file-loader!maplibre-gl/dist/maplibre-gl-csp-worker';
|
||||
import 'maplibre-gl/dist/maplibre-gl.css';
|
||||
|
||||
mapboxgl.workerUrl = mbWorkerUrl;
|
||||
mapboxgl.setRTLTextPlugin(mbRtlPlugin);
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
*/
|
||||
|
||||
// Mapbox-gl doesn't declare this type.
|
||||
declare module 'mapbox-gl/dist/mapbox-gl-csp';
|
||||
declare module 'maplibre-gl/dist/maplibre-gl-csp';
|
||||
|
|
25
yarn.lock
25
yarn.lock
|
@ -5524,13 +5524,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/lz-string/-/lz-string-1.3.34.tgz#69bfadde419314b4a374bf2c8e58659c035ed0a5"
|
||||
integrity sha512-j6G1e8DULJx3ONf6NdR5JiR2ZY3K3PaaqiEuKYkLQO0Czfi1AzrtjfnfCROyWGeDd5IVMKCwsgSmMip9OWijow==
|
||||
|
||||
"@types/mapbox-gl@1.13.1":
|
||||
version "1.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/mapbox-gl/-/mapbox-gl-1.13.1.tgz#bd8108f912f32c895117e2970b6d4fbbecbe42a1"
|
||||
integrity sha512-Yqv1eFAzG2gdecc94higNC8KE+BR6t8QhFgbQGGEpKr3OgSVVtr2qaBNBPaGlIAtCoKDF6JGB2haOhvijYC4Bg==
|
||||
dependencies:
|
||||
"@types/geojson" "*"
|
||||
|
||||
"@types/markdown-it@^0.0.7":
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.7.tgz#75070485a3d8ad11e7deb8287f4430be15bf4d39"
|
||||
|
@ -19071,10 +19064,15 @@ mapbox-gl-draw-rectangle-mode@1.0.4:
|
|||
resolved "https://registry.yarnpkg.com/mapbox-gl-draw-rectangle-mode/-/mapbox-gl-draw-rectangle-mode-1.0.4.tgz#42987d68872a5fb5cc5d76d3375ee20cd8bab8f7"
|
||||
integrity sha512-BdF6nwEK2p8n9LQoMPzBO8LhddW1fe+d5vK8HQIei+4VcRnUbKNsEj7Z15FsJxCHzsc2BQKXbESx5GaE8x0imQ==
|
||||
|
||||
mapbox-gl@1.13.1:
|
||||
version "1.13.1"
|
||||
resolved "https://registry.yarnpkg.com/mapbox-gl/-/mapbox-gl-1.13.1.tgz#322efe75ab4c764fc4c776da1506aad58d5a5b9d"
|
||||
integrity sha512-GSyubcoSF5MyaP8z+DasLu5v7KmDK2pp4S5+VQ5WdVQUOaAqQY4jwl4JpcdNho3uWm2bIKs7x1l7q3ynGmW60g==
|
||||
mapcap@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/mapcap/-/mapcap-1.0.0.tgz#e8e29d04a160eaf8c92ec4bcbd2c5d07ed037e5a"
|
||||
integrity sha512-KcNlZSlFPx+r1jYZmxEbTVymG+dIctf10WmWkuhrhrblM+KMoF77HelwihL5cxYlORye79KoR4IlOOk99lUJ0g==
|
||||
|
||||
maplibre-gl@1.15.2:
|
||||
version "1.15.2"
|
||||
resolved "https://registry.yarnpkg.com/maplibre-gl/-/maplibre-gl-1.15.2.tgz#7fb47868b62455af916c090903f2154394450f9c"
|
||||
integrity sha512-uPeV530apb4JfX3cRFfE+awFnbcJTOnCv2QvY4mw4huiInbybElWYkNzTs324YLSADq0f4bidRoYcR81ho3aLA==
|
||||
dependencies:
|
||||
"@mapbox/geojson-rewind" "^0.5.0"
|
||||
"@mapbox/geojson-types" "^1.0.2"
|
||||
|
@ -19100,11 +19098,6 @@ mapbox-gl@1.13.1:
|
|||
tinyqueue "^2.0.3"
|
||||
vt-pbf "^3.1.1"
|
||||
|
||||
mapcap@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/mapcap/-/mapcap-1.0.0.tgz#e8e29d04a160eaf8c92ec4bcbd2c5d07ed037e5a"
|
||||
integrity sha512-KcNlZSlFPx+r1jYZmxEbTVymG+dIctf10WmWkuhrhrblM+KMoF77HelwihL5cxYlORye79KoR4IlOOk99lUJ0g==
|
||||
|
||||
marge@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/marge/-/marge-1.0.1.tgz#52d6026911e62e1dd1cf60a07313dde285a8370c"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue