fix: Kabelstrecken werden ausgeblendet
This commit is contained in:
@@ -37,19 +37,15 @@ export const setupPolylines = async (
|
||||
basePath = config.basePath || "";
|
||||
}
|
||||
} catch (e) {}
|
||||
if (!polylineVisible) {
|
||||
//console.warn("Polylines deaktiviert - keine Zeichnung");
|
||||
return { markers: [], polylines: [] };
|
||||
}
|
||||
|
||||
if (!polylineVisible) {
|
||||
// Entferne alle Polylinien, wenn sie ausgeblendet werden sollen
|
||||
if (window.polylines) {
|
||||
window.polylines.forEach(polyline => {
|
||||
if (map.hasLayer(polyline)) {
|
||||
if (map && map.hasLayer(polyline)) {
|
||||
map.removeLayer(polyline);
|
||||
}
|
||||
});
|
||||
window.polylines = [];
|
||||
}
|
||||
return { markers: [], polylines: [] };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user