From 40017b152a2087d34330fe584823e30a06f7ab56 Mon Sep 17 00:00:00 2001 From: Johannes Baumeister Date: Thu, 25 Jun 2026 09:05:01 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20render=20Wohngeb=C3=A4ude=20as=20larger?= =?UTF-8?q?=20house=20icons=20using=20pointToLayer=20in=20createDbLayer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app.js b/app.js index 8144933..41e3c4a 100644 --- a/app.js +++ b/app.js @@ -1110,6 +1110,26 @@ document.addEventListener('DOMContentLoaded', async () => { const layer = L.geoJSON(geojsonData, { style: styleFunc, + pointToLayer: (feature, latlng) => { + if (name.toLowerCase().includes('wohngebäude')) { + return L.marker(latlng, { + icon: L.divIcon({ + className: 'residential-icon', + html: '🏠', + iconSize: [24, 24], + iconAnchor: [12, 12] + }) + }); + } + return L.circleMarker(latlng, { + radius: 4, + fillColor: styleFunc().color || 'violet', + color: "#fff", + weight: 1, + opacity: 1, + fillOpacity: 0.8 + }); + }, onEachFeature: (feature, l) => { if (feature.properties) { let popup = `${name}

`;