Fixed visibility of 'Projektgesellschaft' areas by removing hardcoded transparency checks
Deploy TrassenPlaner / deploy (push) Waiting to run Details

This commit is contained in:
Johannes Baumeister 2026-04-15 21:17:35 +02:00
parent b75dd45677
commit 0cf7110f67
1 changed files with 3 additions and 5 deletions

View File

@ -1237,20 +1237,18 @@
}).addTo(map), }).addTo(map),
ownerStatus: L.geoJSON(null, { ownerStatus: L.geoJSON(null, {
style: (f) => { style: (f) => {
// Extract status, assuming the first one holds the color or they are all same
// It uses _mergedOwners from preprocessing if available, else standard feature properties
const properties = f.properties._mergedOwners && f.properties._mergedOwners.length > 0 ? f.properties._mergedOwners[0] : f.properties; const properties = f.properties._mergedOwners && f.properties._mergedOwners.length > 0 ? f.properties._mergedOwners[0] : f.properties;
const status = (properties.status || 'Unbekannt').trim(); const status = (properties.status || 'Unbekannt').trim();
const color = getStatusColor(status); const color = getStatusColor(status);
const isUnknown = color === 'transparent' || status.includes('04') || status.includes('05'); const isTransparent = color === 'transparent';
return { return {
stroke: false, stroke: false,
fillColor: color, fillColor: color,
fillOpacity: isUnknown ? 0.0 : 0.6, fillOpacity: isTransparent ? 0.0 : 0.6,
pane: 'ownerStatusPane' pane: 'ownerStatusPane'
}; };
}, },
interactive: false // Don't steal popup clicks from the outline layer interactive: false
}).addTo(map), }).addTo(map),
usage: L.geoJSON(null, { usage: L.geoJSON(null, {
style: usageStyle, style: usageStyle,