[openstreetmap/openstreetmap-website] Generate maplibre styles from `layers.yml` (PR #6772)

Frank Elsinga notifications at github.com
Fri Feb 6 13:38:29 UTC 2026


@CommanderStorm commented on this pull request.



>      ) => {
       if (credit) layerOptions.attribution = makeAttribution(credit);
       if (nameId) layerOptions.name = OSM.i18n.t(`javascripts.map.base.${nameId}`);
 
-      if (OSM.isDarkMap() && L.OSM[leafletOsmDarkId]) {
-        layerOptions.leafletOsmId = leafletOsmDarkId;
-      } else if (L.OSM[leafletOsmId]) {
-        layerOptions.leafletOsmId = leafletOsmId;
-      } else {
-        layerOptions.leafletOsmId = "TileLayer";
-      }
-
-      const layerConstructor = L.OSM[layerOptions.leafletOsmId];
+      const layerConstructor =
+        (OSM.isDarkMap() && L.OSM[leafletOsmDarkId]) ||
+        L.OSM[leafletOsmId] ||
+        L.OSM.TileLayer;

If it is possible with resonable effort, that would be another step into the direction where "we" want to go.

Removing this is on my TODO list for the second-to-last MapLibre migration PR, but if we can pull this out this again makes the diff smaller.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6772/review/3763161201 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260206/3f77dcd4/attachment.htm>


More information about the rails-dev mailing list