[openstreetmap/openstreetmap-website] Use map tiles dark mode from leaflet-osm plugin (PR #5426)
Marwin Hochfelsner
notifications at github.com
Mon Dec 30 13:06:15 UTC 2024
@hlfan commented on this pull request.
> @@ -31,6 +31,9 @@ L.OSM.layers = function (options) {
var miniMap = L.map(mapContainer[0], { attributionControl: false, zoomControl: false, keyboard: false })
.addLayer(new layer.constructor(layer.options));
+ if (layer.options.schemeClass) miniMap.getPane("tilePane").classList.add(layer.options.schemeClass);
+ miniMap.getPane("tilePane").style.setProperty("--dark-mode-map-filter", layer.options.filter || "none");
Since the opinions in #5328 varied wildly, I wanted to have an easy flag for other devs that an alternate tileset has been loaded, since some might like a different styling like I already mentioned in https://github.com/openstreetmap/openstreetmap-website/pull/5396#issue-2736705476.
You are correct in that it doesn't do anything on the unmodified site.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5426#discussion_r1899531743
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5426/review/2525565472 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241230/6f51e593/attachment.htm>
More information about the rails-dev
mailing list