add: implement API-Endpoint GisStationsStatusDistrict.js for icons prio "Le" and Color

This commit is contained in:
ISA
2024-06-25 09:35:25 +02:00
parent 01d9a2945a
commit a6e2e5a4f2
4 changed files with 197 additions and 260 deletions

View File

@@ -478,60 +478,6 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
initMap.flyTo([x, y], zoom);
}
//------------------------------------------
/* const getIconPath = (status, iconNumber, marker) => {
let path = status
? `img/icons/${status}-marker-icon-${iconNumber}.png`
: `img/icons/marker-icon-${iconNumber}.png`;
for (let priority of priorityConfig) {
if (path.includes(priority.name.toLowerCase())) {
marker.setBouncingOptions({
bounceHeight: 15,
contractHeight: 12,
bounceSpeed: 52,
contractSpeed: 52,
shadowAngle: null,
});
if (path.includes(priority.name.toLowerCase())) {
marker.bounce(3);
}
break;
}
}
return path;
}; */
//---------
/* function getIconPath(status, iconNumber, marker) {
let path = status
? `img/icons/${status}-marker-icon-${iconNumber}.png`
: `img/icons/marker-icon-${iconNumber}.png`;
// Wenn der Pfad das Wort "critical" oder "major" enthält, dann den Marker bouncing options setzen
if (
//Stationsausfall
path.includes("Stationsausfall") || // Priorität 1, Level 0
path.includes("critical") || // Priorität 2, Level 1
path.includes("major") || // Priorität 3, Level 2
path.includes("minor") || // Priorität 4, Level 3
path.includes("system") // Priorität 5, Level 4
) {
// Setze Bouncing-Optionen
marker.setBouncingOptions({
bounceHeight: 15, // Höhe des Bounces
contractHeight: 12, // Höhe des Einzugs beim Landen
bounceSpeed: 52, // Geschwindigkeit des Bounces
contractSpeed: 52, // Geschwindigkeit des Einzugs
shadowAngle: null, // Standard-Schattenwinkel
});
// Check if the icon path includes 'critical'
if (path.includes("critical")) {
// marker.bounce(3);
}
}
return path;
} */
//------------------------------------------
// Funktionen zur Überwachung der Internetverbindung
const checkInternet = () => {