Skip to content

Switch map to MapLibre GL with OpenFreeMap vector tiles - #401

Merged
skerbis merged 1 commit into
mainfrom
feature/maplibre-openfreemap
Sep 22, 2026
Merged

skerbis merged 1 commit into
mainfrom
feature/maplibre-openfreemap

Conversation

@skerbis

@skerbis skerbis commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Replaces Leaflet (+ markercluster, edgebuffer, custom hash plugin) with a pure MapLibre GL map using the free OpenFreeMap "Liberty" vector tiles (no API key, no request limits, replaces the CARTO raster tiles which were limited to 75k requests).

  • Native GeoJSON clustering, GPU-rendered markers and cluster circles
  • Cluster click zooms to the bounds of its members; people sharing the exact same position get a list popup linking to their profiles
  • URL hash handling reimplemented, existing links like #staabm and #5.5,50.8,9.5 keep working
  • Map labels follow the browser language (name:xx fields from OpenMapTiles, ~75 languages, falls back to the style default)
  • REDAXO color theme for the map (blue/neon palette) with a light and dark variant following prefers-color-scheme, including dark styles for popups, attribution and the info overlay (white "AXO" logo variant)
  • Vendored MapLibre GL 5.24.0 (last version with a UMD build) under assets/vendor/maplibre-gl/

Notes

  • maxBounds uses ±179.9° instead of ±180° because MapLibre 5.24 throws in its constrain code for full-width bounds (commented in code)
  • The Liberty sprite already contains an image named marker, so our icon is registered as people-marker
  • Remaining console warnings (missing POI sprite images, one null in a style expression) originate from the OpenFreeMap style itself

Test plan

Tested locally with Jekyll in Docker and headless Chromium:

  • Overview renders tiles, markers, clusters and attribution without console errors
  • Cluster click zooms in, location hash updates
  • Deep link #staabm opens the popup and sets the document title; closing restores a location hash
  • Three people on one coordinate show a list popup, clicking a name opens the profile with user hash
  • Labels in German / Japanese / English locale, fallback for unknown locale
  • Light and dark theme at zoom 3, 6, 12, 16 plus live switch of the color scheme

Replace Leaflet, Leaflet.markercluster, Leaflet.edgebuffer and the custom
hash plugin with a pure MapLibre GL implementation using the free
OpenFreeMap "Liberty" style (no API key, no request limits).

- Native GeoJSON clustering, GPU-rendered markers and cluster circles
- Cluster click zooms to the bounds of its members; people sharing one
  position get a list popup with links to their profiles
- URL hash handling reimplemented (compatible with existing #user and
  #zoom,lat,lng links)
- Map labels follow the browser language (name:xx fields of OpenMapTiles)
- REDAXO color theme for the map with light and dark variant following
  prefers-color-scheme, incl. dark styles for popups and info overlay
- Vendored MapLibre GL 5.24.0 (last version with UMD build)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@skerbis
skerbis merged commit 42e9e3d into main Sep 22, 2026
1 check passed
@skerbis
skerbis deleted the feature/maplibre-openfreemap branch September 22, 2026 16:23
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