migrate geojson map from patched leaflet raster to maplibre vector

What does this MR do and why?

Replaces the Leaflet raster tile map library with MapLibre GL JS vector tiles for the GeoJSON blob viewer.

Closes #590482

Why:

  • Removes a patched dependency (patches/leaflet+1.9.4.patch)
  • Vector tiles render sharply at all zoom levels with continuous smooth zooming, instead of the stepped/blurry raster approach
  • MapLibre GL uses WebGL for hardware-accelerated rendering

What changed:

  • Swapped leaflet for maplibre-gl in package.json
  • Rewrote utils.js to use MapLibre's source/layer API with native geometry type styling (points, lines, polygons)
  • Switched tile source from OpenStreetMap raster to OpenFreeMap vector (https://tiles.openfreemap.org/styles/liberty)
  • Added https://tiles.openfreemap.org to CSP connect_src
  • Deleted patches/leaflet+1.9.4.patch
  • Added maplibre-gl to Jest transformIgnorePatterns
  • Updated all related specs

Before / After

Before

Step-wise zoom on blurry raster graphics

Screenshot_2026-02-18_at_02.06.33

After

Smooth zoom on crisp vector graphics

Screenshot_2026-02-18_at_02.13.32

References

How to set up and validate locally

  1. Open a repository that contains a .geojson file (e.g. geojson-demo)
  2. Verify the map renders with vector tiles (smooth continuous zoom, sharp at all levels)
  3. Verify popups appear on click for features with properties
  4. Verify polygons, lines, and points all render with correct styling
  5. Verify the map fits to the bounds of the GeoJSON data
Edited by Birk Skyum

Merge request reports

Loading