[openstreetmap/openstreetmap-website] Generate maplibre styles from `layers.yml` (PR #6772)
Marwin Hochfelsner
notifications at github.com
Fri Feb 6 12:09:15 UTC 2026
@hlfan 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;
I've pondered preemptively ditching the L.OSM layers for a single source of truth. What do you think of that?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6772#discussion_r2773818248
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6772/review/3762728651 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260206/ffe0c4d8/attachment.htm>
More information about the rails-dev
mailing list