-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support MapLibre GL JS as an alternative to Mapbox GL JS #133
Comments
@dwoznicki thanks for opening this issue! I think it would be great to use MapLibre with fresco. Of the options you suggested, my vote is:
To me this makes the most sense as there are a lot of renderers out there and it would be nice to eventually support them. Do you know if MapLibre's API is tracking mapbox-gl-js v2? Being able to swap between v1 and v2 of both libraries would be amazing.
Please send in a PR and we can get @justenPalmer looped in for a review. |
I don't believe MapLibre is following the Mapbox v2 API directly, though I could be wrong. I suspect it's not because the MapLibre team is making a conscious effort to differentiate maplibre-gl-js from mapbox-gl-js for legal reasons. I do know that maplibre-gl-js v1 is backwards compatible with mapbox-gl-js v1, though. |
I think you meant v2 in the first part, right? I think this would definitely be valuable! Though as soon as users load a v2 style and use maplibre a warning should be presented, or the loading should be aborted and an error should be shown probably. |
Mmm, no I meant v1. I'm fairly certain maplibre-gl-js v1 was made to be backwards compatible with mapbox-gl-js v1. I suspect you know more about this @maxammann, so let me know if that's not correct. It looks like maplibre-gl-js v2 has some breaking changes (https://github.com/maplibre/maplibre-gl-js/releases/tag/v2.0.0) which make it incompatible with mapbox-gl-js v1. That said, I believe my style.json works with both maplibre-gl-js v2 and mapbox-gl-js v1 without any issue. |
Oh sorry I mis-read what you have written. Yes both specs which work in mapbox v1 still work in maplibre. |
We probably should track which exact version of the style spec maplibre supports. |
I'd like to use MapLibre GL JS as my map renderer instead of Mapbox GL JS. MapLibre is an open source fork of Mapbox after they changed to a proprietary model, and includes features and bug fixes that are not available to earlier versions of Mapbox GL JS.
The MapLibre NPM package is set up to be a drop-in replacement for Mapbox, so swapping over is pretty painless. I managed to load it up simply by changing the imports in
src/component/Map/MapMapbox.jsx
.I'd be happy to contribute this feature, but I'm not sure how best to proceed.
mapbox-gl
dependency withmaplibre-gl
, if you don't anticipate people really caring which library is used.Any thoughts?
The text was updated successfully, but these errors were encountered: