kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
Support dark mode fully in live map (#225)
* Update style.css * dark mode map Co-authored-by: Uskompuf <22492406+Uskompuf@users.noreply.github.com>pull/249/head
rodzic
391135ba9d
commit
ad96dd6023
|
@ -14,11 +14,20 @@ $(document).ready(function(){
|
|||
L.control.scale().addTo(map);
|
||||
L.control.attribution({prefix:false}).addTo(map);
|
||||
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', {
|
||||
attribution: '<div><a href="https://leafletjs.com/">Leaflet</a> · Map: <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a></div>',
|
||||
minZoom: 1,
|
||||
maxZoom: 19
|
||||
});
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
var osm = L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
minZoom: 1,
|
||||
maxZoom: 19
|
||||
});
|
||||
} else {
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', {
|
||||
attribution: '<div><a href="https://leafletjs.com/">Leaflet</a> · Map: <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a></div>',
|
||||
minZoom: 1,
|
||||
maxZoom: 19
|
||||
});
|
||||
}
|
||||
|
||||
var esri = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
|
||||
attribution: '<div><a href="https://leafletjs.com/">Leaflet</a> · Map: <a href="https://www.esri.com/">Esri</a> · Earthstar Geographics</div>',
|
||||
minZoom: 1,
|
||||
|
|
|
@ -370,4 +370,11 @@ p{
|
|||
color: white;
|
||||
background-color: grey;
|
||||
}
|
||||
.leaflet-bar a {
|
||||
background-color: grey !important;
|
||||
}
|
||||
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
|
||||
color: white !important;
|
||||
background: grey !important;
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue