feat(windkarte): add per-area geo export + dynamic favicon
- /api/vorranggebiete.geojson + .kml endpoints (filter via ?id=W-XX) - Download-Buttons in WindAreaPanel pro selektiertes Gebiet - Hover-Tooltip auf Polygon zeigt Fläche, geplante Anlagen, Höhe, Gemeinden - Favicon + apple-touch-icon dynamisch aus data.logoUrl (CMS-Logo) - alte windrad-PNGs in static/favicons/ entfernt - WindkarteBlock list-fetch: _limit statt limit (RustyCMS-Param) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -257,8 +257,22 @@
|
||||
});
|
||||
|
||||
// Hover tooltip
|
||||
const hoverLabel = area.bezeichnung ?? p.name ?? "";
|
||||
layer.bindTooltip(hoverLabel, { sticky: true, className: "windkarte-tooltip" });
|
||||
const nrLabel = area.gebiets_nr ?? p.name ?? "";
|
||||
const title = area.bezeichnung
|
||||
? `${nrLabel} – ${area.bezeichnung}`
|
||||
: nrLabel;
|
||||
const lines: string[] = [];
|
||||
if (area.flaeche_ha != null) lines.push(`Fläche: ${area.flaeche_ha.toFixed(1)} ha`);
|
||||
if (area.anlagen_geplant != null) lines.push(`Geplante Anlagen: ${area.anlagen_geplant}`);
|
||||
if (area.hoehe_max_m != null) lines.push(`Max. Nabenhöhe: ${area.hoehe_max_m} m`);
|
||||
if (area.gemeinden && area.gemeinden.length > 0) {
|
||||
lines.push(`Gemeinden: ${area.gemeinden.slice(0, 3).join(', ')}${area.gemeinden.length > 3 ? '…' : ''}`);
|
||||
}
|
||||
const esc = (s: string) => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
const tooltipHtml =
|
||||
`<div class="font-semibold">${esc(title)}</div>` +
|
||||
(lines.length ? `<div class="mt-0.5 text-xs opacity-90">${lines.map(esc).join('<br/>')}</div>` : '');
|
||||
layer.bindTooltip(tooltipHtml, { sticky: true, className: "windkarte-tooltip" });
|
||||
|
||||
// Permanent label via divIcon marker at polygon center
|
||||
const nr = area.gebiets_nr ?? p.name;
|
||||
|
||||
Reference in New Issue
Block a user