feat(draw): Linien-Typ-Abfrage – Normal / Leitung / Rettungsachse (v1.4.13)
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 31m14s

- Beim Zeichnen von Linie/Pfeil fragt der Dialog jetzt den Linientyp ab:
  Normal (gewählte Farbe), Leitung (blau, dicker), Rettungsachse (grün, gestrichelt)
- Typ in properties.lineType gespeichert; Leitung/Rettungsachse setzen konventionelle
  Farbe + Stärke, Normal behält die Zeichenfarbe
- Eigener MapLibre-Layer mit Dash-Muster für Rettungsachse (klar als freizuhaltende Achse erkennbar)
- Typ-Auswahl auch ohne Label übernehmbar; Änderung wird live gesynct
- ROADMAP: 5.1 abgehakt

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pepe Ziberi
2026-07-19 15:27:42 +02:00
parent 6e3663cf7f
commit 703265f47e
5 changed files with 122 additions and 31 deletions

View File

@@ -810,12 +810,12 @@ export function MapView({
},
})
// Line layer
// Line layer — alle Linien AUSSER Rettungsachse (die bekommt ihren eigenen gestrichelten Layer)
m.addLayer({
id: 'draw-lines',
type: 'line',
source: 'draw-features',
filter: ['==', ['geometry-type'], 'LineString'],
filter: ['all', ['==', ['geometry-type'], 'LineString'], ['!=', ['get', 'lineType'], 'rettungsachse']],
layout: {
'line-cap': 'round',
'line-join': 'round',
@@ -826,6 +826,23 @@ export function MapView({
},
})
// Rettungsachse — gestrichelt, damit sie als freizuhaltende Achse klar erkennbar ist
m.addLayer({
id: 'draw-lines-rettungsachse',
type: 'line',
source: 'draw-features',
filter: ['all', ['==', ['geometry-type'], 'LineString'], ['==', ['get', 'lineType'], 'rettungsachse']],
layout: {
'line-cap': 'butt',
'line-join': 'round',
},
paint: {
'line-color': ['get', 'color'],
'line-width': ['coalesce', ['get', 'width'], 6],
'line-dasharray': [2, 1.5],
},
})
// Point layer
m.addLayer({
id: 'draw-points',
@@ -1378,6 +1395,7 @@ export function MapView({
color: (f.properties.color as string) || '#000000',
width: (f.properties.width as number) || 3,
isDangerZone: f.properties.isDangerZone ? 1 : 0,
lineType: (f.properties.lineType as string) || 'normal',
},
}))