[openstreetmap/openstreetmap-website] Minimap migration from Leaflet to MapLibre (PR #6683)

Marwin Hochfelsner notifications at github.com
Thu Jan 29 12:00:27 UTC 2026


@hlfan commented on this pull request.



> @@ -16,34 +20,53 @@ L.OSM.layers = function (options) {
       input.checked = map.hasLayer(layer);
 
       map.whenReady(function () {
-        const miniMap = L.map(container, { attributionControl: false, zoomControl: false, keyboard: false })
-          .addLayer(new layer.constructor(layer.options));
+        const styleId = layer.options.leafletOsmId;
+        const style = OSM.MapLibre.Styles[styleId](layer.options);
+        const miniMap = new OSM.MapLibre.Map({
+          container,
+          style,
+          interactive: false,
+          attributionControl: false,
+          fadeDuration: 0,
+          zoomSnap: styleId === "OpenMapTiles" || styleId === "ShortBread" ? 0.0 : 1.0

This surely won't be the last time we need this distinction.
I think we can no longer postpone adding a flag for vector layers in the `layers.yml`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6683#pullrequestreview-3722266222
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6683/review/3722266222 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260129/b62afb14/attachment.htm>


More information about the rails-dev mailing list