Show more info in POI popups: category, description, address, phone

Popup now shows: name, category label, description, address (street +
housenumber + postcode + city), phone (clickable tel: link), opening
hours, website, and OSM link.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-11 01:33:31 +02:00
parent 65330cf9e2
commit a62b35bf45
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -115,6 +115,13 @@ export function PoiMarkers({ poiState }: PoiPanelProps) {
});
const popupLines = [`<strong>${poi.name ?? cat.icon + " " + poi.category}</strong>`];
popupLines.push(`<span style="font-size:11px;color:#888">${cat.icon} ${cat.id.replace(/_/g, " ")}</span>`);
if (poi.tags.description) popupLines.push(`<span style="font-size:12px">${poi.tags.description}</span>`);
const addr = [poi.tags["addr:street"], poi.tags["addr:housenumber"]].filter(Boolean).join(" ");
const addrCity = [addr, poi.tags["addr:postcode"], poi.tags["addr:city"]].filter(Boolean).join(", ");
if (addrCity) popupLines.push(`📍 ${addrCity}`);
const phone = poi.tags.phone ?? poi.tags["contact:phone"];
if (phone) popupLines.push(`📞 <a href="tel:${phone}">${phone}</a>`);
if (poi.tags.opening_hours) popupLines.push(`🕐 ${poi.tags.opening_hours}`);
if (poi.tags.website) popupLines.push(`<a href="${poi.tags.website}" target="_blank" rel="noopener">Website</a>`);
popupLines.push(`<a href="https://www.openstreetmap.org/node/${poi.id}" target="_blank" rel="noopener" style="font-size:11px;color:#666">OSM</a>`);