Skip to content

Instantly share code, notes, and snippets.

View powerpook's full-sized avatar
🏈
I may be slow to respond.

powerpook

🏈
I may be slow to respond.
View GitHub Profile
@powerpook
powerpook / leaflet-darkmode.md
Created May 10, 2022 10:27 — forked from BrendonKoz/leaflet-darkmode.md
Automatic Dark Mode for Leaflet.js
// Leaflet JS - note the *className* attribute
// [...]

L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
    className: 'map-tiles'
}).addTo(map);

// [...]