feat: render Wohngebäude as larger house icons using pointToLayer in createDbLayer
Deploy Standortplaner / deploy (push) Successful in 17s
Details
Deploy Standortplaner / deploy (push) Successful in 17s
Details
This commit is contained in:
parent
866d749388
commit
40017b152a
20
app.js
20
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: '<span style="font-size: 20px; line-height: 24px;">🏠</span>',
|
||||
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 = `<b>${name}</b><br><hr style="margin: 5px 0; border: 0; border-top: 1px solid #444;">`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue