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:
@@ -45,6 +45,19 @@
|
||||
if (!c) return null;
|
||||
return `https://www.openstreetmap.org/?mlat=${c[0].toFixed(5)}&mlon=${c[1].toFixed(5)}#map=14/${c[0].toFixed(5)}/${c[1].toFixed(5)}`;
|
||||
}
|
||||
|
||||
const exportInfo = $derived(
|
||||
area
|
||||
? [
|
||||
`Gebiet ${area.gebiets_nr}${area.bezeichnung ? ` – ${area.bezeichnung}` : ''}`,
|
||||
area.flaeche_ha != null ? `Fläche: ${area.flaeche_ha.toFixed(1)} ha` : null,
|
||||
area.anlagen_geplant != null ? `Geplante Anlagen: ${area.anlagen_geplant}` : null,
|
||||
area.hoehe_max_m != null ? `Max. Nabenhöhe: ${area.hoehe_max_m} m` : null,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join('\n')
|
||||
: ''
|
||||
);
|
||||
</script>
|
||||
|
||||
{#if area}
|
||||
@@ -155,6 +168,31 @@
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Export-Downloads -->
|
||||
<div>
|
||||
<p class="mb-2 text-xs font-medium uppercase tracking-wide text-stein-500">Geodaten-Export ({area.gebiets_nr})</p>
|
||||
<div class="flex gap-2">
|
||||
<a
|
||||
href="/api/vorranggebiete.geojson?id={encodeURIComponent(area.gebiets_nr)}"
|
||||
download
|
||||
title={`GeoJSON herunterladen\n${exportInfo}`}
|
||||
class="flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-stein-200 px-2 py-2 text-xs font-medium text-stein-600 no-underline hover:bg-stein-50 transition-colors whitespace-nowrap"
|
||||
>
|
||||
<Icon icon="mdi:download" class="size-3.5 shrink-0" />
|
||||
GeoJSON
|
||||
</a>
|
||||
<a
|
||||
href="/api/vorranggebiete.kml?id={encodeURIComponent(area.gebiets_nr)}"
|
||||
download
|
||||
title={`KML herunterladen\n${exportInfo}`}
|
||||
class="flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-stein-200 px-2 py-2 text-xs font-medium text-stein-600 no-underline hover:bg-stein-50 transition-colors whitespace-nowrap"
|
||||
>
|
||||
<Icon icon="mdi:download" class="size-3.5 shrink-0" />
|
||||
KML
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user