Tram-Geometrien komplett entfernt — nur Metro A/B/C + Haltestellen mit Linien-Badges (Prag-Tram-Netz zu dicht für visuelle Lesbarkeit)
This commit is contained in:
+13
-15
@@ -226,7 +226,7 @@
|
||||
<body>
|
||||
<div id="header">
|
||||
<h1>🥳 JGA Prag – Tourenplan mit ÖPNV</h1>
|
||||
<div class="sub">25.–26. Juli 2026 · 8 Personen · Hotel Uno Prague als Basis · Tram + Metro für JGA</div>
|
||||
<div class="sub">25.–26. Juli 2026 · 8 Personen · Hotel Uno Prague als Basis · Metro A/B/C + Tram-Haltestellen</div>
|
||||
</div>
|
||||
<div id="map"></div>
|
||||
|
||||
@@ -458,6 +458,9 @@ locations.forEach(loc => {
|
||||
|
||||
const lineLayers = {};
|
||||
function renderLine(lineKey, color, weight, opacity) {
|
||||
// Tram-Linien-Geometrien sind deaktiviert — Prag-Tram-Netz zu dicht, einzelne Linien nicht lesbar
|
||||
// Stattdessen zeigen wir die Haltestellen mit Linien-Badges (siehe IMPORTANT_STOPS)
|
||||
if (lineKey.startsWith('tram_')) return null;
|
||||
const coords = LINES[lineKey];
|
||||
if (!coords) return null;
|
||||
const shadow = L.polyline(coords, {
|
||||
@@ -493,8 +496,11 @@ function toggleLine(lineKey, visible) {
|
||||
removeLine(lineKey);
|
||||
}
|
||||
}
|
||||
// Initial: nur Metro-Linien rendern (Tram-Linien standardmäßig AUS — Prag-Tram-Netz ist zu dicht für JGA-Übersicht)
|
||||
Object.entries(LINES_CONFIG).forEach(([key, cfg]) => {
|
||||
renderLine(key, cfg.color, cfg.weight, cfg.opacity);
|
||||
if (key.startsWith('metro_')) {
|
||||
renderLine(key, cfg.color, cfg.weight, cfg.opacity);
|
||||
}
|
||||
});
|
||||
IMPORTANT_STOPS.forEach(stop => {
|
||||
const stopMarker = L.circleMarker([stop.lat, stop.lon], {
|
||||
@@ -508,7 +514,7 @@ IMPORTANT_STOPS.forEach(stop => {
|
||||
const fg = isMetro && l === 'B' ? '#1a1a1a' : 'white';
|
||||
return `<span style="display:inline-block;background:${bg};color:${fg};padding:1px 5px;border-radius:3px;font-size:10px;font-weight:700;margin-right:3px;">${l}</span>`;
|
||||
}).join('');
|
||||
const popupHtml = `<div class="popup-content"><h3>🚏 ${stop.name}</h3><div class="meta">Linien: ${lineBadges}</div><div class="desc">📍 Nähe: ${stop.near}</div></div>`;
|
||||
const popupHtml = `<div class="popup-content"><h3>🚏 ${stop.name}</h3><div class="meta">Tram-Linien hier: ${lineBadges}</div><div class="desc">📍 Nähe: ${stop.near}</div><div class="desc" style="font-size:11px;color:#94a3b8;margin-top:4px;">ℹ️ Linien-Geometrien nicht dargestellt (zu dicht) — alle 5–10 Min Takt</div></div>`;
|
||||
stopMarker.bindPopup(popupHtml, {className: 'tram-popup'});
|
||||
const labelMarker = L.marker([stop.lat, stop.lon], {
|
||||
icon: L.divIcon({
|
||||
@@ -535,16 +541,8 @@ toggleControl.onAdd = function() {
|
||||
<strong>${num}</strong>
|
||||
</label>`;
|
||||
});
|
||||
html += '<div class="group-header">Tram</div>';
|
||||
Object.keys(LINES_CONFIG).filter(k => k.startsWith('tram_')).sort((a,b) => parseInt(a.split('_')[1])-parseInt(b.split('_')[1])).forEach(key => {
|
||||
const cfg = LINES_CONFIG[key];
|
||||
const num = key.split('_')[1];
|
||||
html += `<label>
|
||||
<input type="checkbox" data-line="${key}" checked>
|
||||
<span class="swatch" style="background:${cfg.color}"></span>
|
||||
${num}
|
||||
</label>`;
|
||||
});
|
||||
// Tram-Linien-Toggles entfernt — Prag-Tram-Netz zu dicht für visuelle Darstellung
|
||||
// Stattdessen: Linien-Badges an den Haltestellen zeigen welche Trams dort halten
|
||||
div.innerHTML = html;
|
||||
div.addEventListener('change', (e) => {
|
||||
const lineKey = e.target.dataset.line;
|
||||
@@ -579,8 +577,8 @@ legend.onAdd = function() {
|
||||
🚇 Metro: <span style="color:#00B140;font-weight:700">A</span> ·
|
||||
<span style="color:#FFD700;font-weight:700">B</span> ·
|
||||
<span style="color:#E2231A;font-weight:700">C</span><br>
|
||||
🚋 Tram: 2/4/7/13/17/18/22<br>
|
||||
<span style="font-size:10px;">Toggle oben rechts</span>
|
||||
🚋 Tram: Haltestellen mit Linien-Badges<br>
|
||||
<span style="font-size:10px;">Marker anklicken für Details</span>
|
||||
</div>
|
||||
`;
|
||||
return div;
|
||||
|
||||
Reference in New Issue
Block a user