[Maps] switch from mapbox-gl to maplibre-gl#85566
[Maps] switch from mapbox-gl to maplibre-gl#85566nreese wants to merge 9 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-gis (Team:Geo) |
|
@nreese Thanks for trying this out, its encouraging to see more confirmation that this is a drop-in replacement. Could you look at what I'm proposing doing in: maplibre/maplibre-gl-js#33 And let me know if that strikes you as something safe for your usage? I think I can do this with full compat, but I'm open to releasing v1.13.0 without this change too. |
|
@elasticmachine merge upstream |
| import mbWorkerUrl from '!!file-loader!maplibre-gl/dist/maplibre-gl-csp-worker'; | ||
|
|
||
| mapboxgl.workerUrl = mbWorkerUrl; | ||
| mapboxgl.setRTLTextPlugin(mbRtlPlugin); |
There was a problem hiding this comment.
@nreese maybe we can move that duplicated code into oss/map plugin and reexport it then.
// @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!maplibre-gl/dist/maplibre-gl-csp-worker';
mapboxgl.workerUrl = mbWorkerUrl;
mapboxgl.setRTLTextPlugin(mbRtlPlugin);
|
@elasticmachine merge upstream |
💔 Build Failed
Failed CI StepsMetrics [docs]Module Count
Async chunks
Unknown metric groupsmiscellaneous assets size
History
To update your PR or re-run it, just comment with: |
|
Closed, replaced with #104505 |
This PR switches from mapbox-gl to maplibre-gl. The first release of maplibre-gl is a drop in replacement for mapbox-gl 1.13.0.
Background
Mapbox v2.0 switched from an open source license to a closed source license requiring a mapbox subscription - mapbox/mapbox-gl-js#10162.
The mapbox subscription charges per map load event even if the map does not use any mapbox services. This means that any time a Map Embeddable is loaded by a user in Kibana, whether in observably, security, dashboard, canvas, or maps, that usage would count against this charge.
There is an effort to from a community to maintain an open source version at https://github.com/maplibre/maplibre-gl-js. We need to migrate our usage to this open source version.