<p></p>
<p><b>@gravitystorm</b> requested changes on this pull request.</p>

<p dir="auto">I'm very happy to see this work, thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hlfan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hlfan">@hlfan</a>!</p>
<p dir="auto">The code looks fine to me, but I'm not a javascript expert so maybe there are better ways to write parts.</p>
<p dir="auto">Two other changes requested:</p>
<ul dir="auto">
<li>Please rework your commits (e.g. using <code class="notranslate">git rebase -i</code>) to avoid having the fixup commits (e.g. combine the linting fixes into the original commits)</li>
<li>There's still a darken filter applied to the map previews - you can see that the colour of the green spaces on the transport dark map are darkened compared to the main map</li>
</ul>
<p dir="auto"><a href="https://github.com/user-attachments/assets/39e9708d-8a21-456f-824e-80a94601c0e3">Screenshot.from.2024-12-18.11-31-42.png (view on web)</a></p><hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5397#discussion_r1890080710">app/assets/javascripts/leaflet.map.js</a>:</p>
<pre style='color:#555'>> @@ -52,9 +57,19 @@ L.OSM.Map = L.Map.extend({
       code: "G"
     });
 
-    this.on("layeradd", function (event) {
-      if (this.baseLayers.indexOf(event.layer) >= 0) {
-        this.setMaxZoom(event.layer.options.maxZoom);
+    this.on("layeradd", function ({ layer }) {
+      if (this.baseLayers.indexOf(layer) >= 0) {
+        this.setMaxZoom(layer.options.maxZoom);
+        const container = layer.getContainer();
+        if (!container) return;
+        if (layer.options.schemeClass) container.classList.add(layer.options.schemeClass);
+        const filterRecievers = [container];
</pre>
<p dir="auto">minor spelling error - <code class="notranslate">filterReceivers</code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5397#pullrequestreview-2511562149">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIBDM65EYMB27UKNZT2GFM6ZAVCNFSM6AAAAABTRRNFV6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMJRGU3DEMJUHE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNTRLQC3NSAXAXCFAL2GFM6ZA5CNFSM6AAAAABTRRNFV6WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTUVWNS2K.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5397/review/2511562149</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5397#pullrequestreview-2511562149",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5397#pullrequestreview-2511562149",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>