Skip to content

Commit 99debba

Browse files
Copilotsteffenaxer
andauthored
Fix dark map: use CartoDB Dark Matter tiles, fix 2.5D overlap with overflow:hidden
- Replace OSM tiles + broken CSS filter hack with CartoDB Dark Matter (natively dark) - Remove aggressive invert/contrast filter that made map unreadable - Add overflow:hidden to .panel to prevent 2.5D rotation from bleeding across panels Agent-Logs-Url: https://github.com/steffenaxer/matsim-libs/sessions/2209a7e6-3f0c-46e7-ac0a-beaf405e1173 Co-authored-by: steffenaxer <26229392+steffenaxer@users.noreply.github.com>
1 parent 87b0911 commit 99debba

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

matsim/tools/ch-viz/ch-visualization.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
flex-direction: column;
103103
position: relative;
104104
min-width: 0;
105+
overflow: hidden; /* prevent 2.5D rotation from bleeding into the other panel */
105106
}
106107

107108
.panel-header {
@@ -149,8 +150,7 @@
149150
background: var(--bg);
150151
}
151152

152-
/* Leaflet dark mode overrides */
153-
.leaflet-tile-pane { filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7); }
153+
/* Leaflet overrides (tiles are natively dark — no filter needed) */
154154
.leaflet-control-attribution { display: none !important; }
155155
.leaflet-control-zoom { display: none !important; }
156156

@@ -533,8 +533,9 @@ <h2>Search Space Comparison</h2>
533533
mapDij = L.map('map-dij', opts);
534534
mapCH = L.map('map-ch', opts);
535535

536-
const tileUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
537-
const tileOpts = { attribution: '', maxZoom: 19 };
536+
// CartoDB Dark Matter — natively dark tiles, no CSS filter hack needed
537+
const tileUrl = 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png';
538+
const tileOpts = { attribution: '', maxZoom: 20, subdomains: 'abcd' };
538539
L.tileLayer(tileUrl, tileOpts).addTo(mapDij);
539540
L.tileLayer(tileUrl, tileOpts).addTo(mapCH);
540541

0 commit comments

Comments
 (0)