<p dir="auto">This lean and updated variant of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2287822763" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4777" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4777/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4777">#4777</a> follows the rules laid out in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2661819843" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5328" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/5328/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/5328">#5328</a> that were implemented in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2708339160" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5362" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5362/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5362">#5362</a>.<br>
Since the editing of the user preference happens on a different view/site, there is no need to listen to color scheme changes on the fly and the whole logic can happen in the initialization of <code class="notranslate">L.OSM.TileLayer</code>.</p>
<markdown-accessiblity-table><table role="table">
<thead>
<tr>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://github.com/user-attachments/assets/1cf69912-61df-43e0-98f4-8b618b4b2e0e">image.png (view on web)</a></td>
<td><a href="https://github.com/user-attachments/assets/39c96953-2135-49a0-96f3-563da18ae011">image.png (view on web)</a></td>
</tr>
</tbody>
</table></markdown-accessiblity-table>
<p dir="auto">Additionally, a "dark" CSS class is introduced to allow better style targeting if the user wants to.<br>
for example like this:<br>
<a href="https://github.com/user-attachments/assets/d90080f6-5265-41fa-8845-f4aeaa5e4a14">image.png (view on web)</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5396'>https://github.com/openstreetmap/openstreetmap-website/pull/5396</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/commits/a03ef2b6a2999facfc82d1a751630dcf39d0593c" class="commit-link">a03ef2b</a>  Add an OSM.isDarkMap() function</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/commits/403986eb2d478ae5c0219c32f0d2ba81400d03bc" class="commit-link">403986e</a>  Use schemed map properties in L.OSM.TileLayer initialization</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/commits/040ff699d371eb09020c638c54117e4e28fe6ebc" class="commit-link">040ff69</a>  Add dark Transport map url</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/commits/27f0cd1d19c559f8752aba873512590340d37600" class="commit-link">27f0cd1</a>  Use the schemed map urls</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/commits/61e8f83d62688d2ae3534ca08900ec83e76924be" class="commit-link">61e8f83</a>  Set normal tile display as standard</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/commits/47e252da26fca0292a91160c3e0f54accab8b272" class="commit-link">47e252d</a>  Let the main map pass its filters to the keys</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/files">3 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/files#diff-a9b88a8a3644f944b9bd54361da588c69fa6a210cf7327194c17895a8ad2b0d6">app/assets/javascripts/osm.js.erb</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/files#diff-e86a39e6d0b163f152db8843fc7d647a3f5d648de4a74f1732bef4474b6e5bc8">app/assets/stylesheets/common.scss</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5396/files#diff-4fe14e869cf17b068e1bea009a55b094fed13f0cad85337cf4769f32b40a01b5">vendor/assets/leaflet/leaflet.osm.js</a>
    (14)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5396.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5396.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5396.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5396.diff</a></li>
</ul>

<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/5396">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNPFRCQDLPKORNSBH32FHPC7AVCNFSM6AAAAABTQPSKUSVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZTMNZQGU2DONQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMHSRID7KYWGF2BWYT2FHPC7A5CNFSM6AAAAABTQPSKUSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKGHWPYQ.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/5396</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/5396",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5396",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>