Skip to content

Migrate to MapLibre GL from Leaflet - #15

Merged
simon04 merged 1 commit into
masterfrom
maplibre-gl
Jul 16, 2026
Merged

Migrate to MapLibre GL from Leaflet#15
simon04 merged 1 commit into
masterfrom
maplibre-gl

Conversation

@simon04

@simon04 simon04 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Replace leaflet, leaflet-control-geocoder and leaflet.locatecontrol with
maplibre-gl and @maplibre/maplibre-gl-geocoder. All base layers and overlays
become MapLibre raster sources; WMS layers are built as tile URL templates
using the {bbox-epsg-3857} placeholder.

Ports the Leaflet-specific helpers:

* src/layer-switcher-control.ts replaces the Leaflet layer control (radio
  buttons for base layers, checkboxes for overlays, collapsible panel), and
  owns the source/layer mutations on the map.
* src/hash.ts replaces leaflet-fullHash. Since MapLibre renders 256px raster
  tiles one zoom level lower than Leaflet, the hash keeps storing the
  Leaflet-style zoom so existing permalinks keep working.

Geocoding now goes through Nominatim via a custom MaplibreGeocoderApi.
@simon04
simon04 merged commit ff699f2 into master Jul 16, 2026
1 check passed
@simon04
simon04 deleted the maplibre-gl branch July 16, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant