Migrate map basemap to MapLibre GL Leaflet - #53836
Closed
birkskyum wants to merge 2 commits into
Closed
Conversation
There was a problem hiding this comment.
Hi @birkskyum
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Member
|
Duplicate of #53816? |
Author
|
Yeah, actually! Great work @bramkragten ! |
Member
|
Thanks for your PR, will take the pieces out that are actually better than mine ;-) |
bramkragten
added a commit
that referenced
this pull request
Aug 27, 2026
At Leaflet zoom 0 the adapter drives the MapLibre map to -1, below the range MapLibre is specified for. Measured, no drift was observable there and the centres stayed in sync, but the adapter's own README recommends a floor of 1 and nobody views a home automation dashboard from world zoom, so there is nothing to weigh against staying inside spec. Spotted in #53836 by @birkskyum, which set this correctly where this branch did not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Replace the map's Leaflet raster tile layer with
@maplibre/maplibre-gl-leafletand the OpenFreeMap Liberty vector style.This is an incremental migration: Leaflet remains responsible for the map API, entity markers, clustering, paths, and drawing controls, while MapLibre GL JS renders the basemap. This limits the scope of the change and provides a path toward a future native MapLibre implementation.
MapLibre GL JS v6 is ESM-only and requires explicit worker handling when bundled. This PR therefore:
maplibre-gl-worker.mjsand its requiredmaplibre-gl-shared.mjssibling into the frontend static assets.Screenshots
Before: CARTO raster basemap
After: OpenFreeMap Liberty vector basemap
Type of change
Additional information
Validation performed:
Checklist
If user exposed functionality or configuration variables are added/changed:
To help with the load of incoming pull requests: