Geräte icon links verschieben
This commit is contained in:
@@ -36,7 +36,7 @@ const getColorClass = (level) => {
|
||||
return priority ? priority.color : "#999999"; // Fallback-Farbe, wenn kein Level gefunden wurde
|
||||
};
|
||||
|
||||
// Ruft die Funktion zum Abrufen der Prioritätsdaten auf und wartet, bis sie abgeschlossen ist
|
||||
/* // Ruft die Funktion zum Abrufen der Prioritätsdaten auf und wartet, bis sie abgeschlossen ist
|
||||
fetchPriorityConfig().then(() => {
|
||||
// Gibt die geladenen Prioritätsdaten in der Konsole aus, um zu überprüfen, ob die Daten korrekt geladen wurden
|
||||
console.log("Prioritätsdaten wurden geladen:", priorityConfig);
|
||||
@@ -49,7 +49,7 @@ fetchPriorityConfig().then(() => {
|
||||
console.log("Farbe für Level 4:", getColorClass(4)); // Farbe für Level 4 anzeigen
|
||||
console.log("Farbe für Level 100:", getColorClass(100)); // Farbe für Level 100 anzeigen
|
||||
console.log("Farbe für Level 101:", getColorClass(101)); // Farbe für Level 101 anzeigen
|
||||
});
|
||||
}); */
|
||||
|
||||
// Funktion zum Erstellen und Setzen von Markern
|
||||
// Funktion zum Erstellen und Setzen von Markern
|
||||
@@ -61,14 +61,14 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
|
||||
|
||||
const response2 = await fetch(config.mapGisStationsStatusDistrictUrl);
|
||||
const statusResponse = await response2.json();
|
||||
console.log("statusResponse: ", statusResponse);
|
||||
//console.log("statusResponse: ", statusResponse);
|
||||
|
||||
const getIdSystemAndAllowValueMap = new Map(GisSystemStatic.map((system) => [system.IdSystem, system.Allow]));
|
||||
|
||||
if (jsonResponse.Points && statusResponse.Statis) {
|
||||
const statisMap = new Map(statusResponse.Statis.map((s) => [s.IdLD, { color: s.Co, level: s.Le }]));
|
||||
|
||||
console.log("idLD , Farbe und Level: ", statisMap);
|
||||
// console.log("idLD , Farbe und Level: ", statisMap);
|
||||
|
||||
let markersData = jsonResponse.Points.filter((station) => station.System === systemId && getIdSystemAndAllowValueMap.get(station.System) === 1).map((station) => {
|
||||
// Statusdaten für die Station abrufen
|
||||
@@ -80,7 +80,7 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
|
||||
// Farbe für das niedrigste Level bestimmen
|
||||
const color = getColorClass(minLevel); // Farbe anhand des Levels
|
||||
|
||||
console.log(`Station: ${station.LD_Name}, Min Level: ${minLevel}, Color: ${color}`);
|
||||
//console.log(`Station: ${station.LD_Name}, Min Level: ${minLevel}, Color: ${color}`);
|
||||
const statisData = statisMap.get(station.IdLD); // Hole Farbe und Level
|
||||
const outerColor = statisData ? statisData.color : "#008013"; // Dynamische Farbe oder Standard-Grün
|
||||
const innerColor = "rgba(255, 255, 255, 0.8)"; // Weiß mit 80% Deckkraft
|
||||
@@ -110,7 +110,7 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
|
||||
" />
|
||||
</div>`,
|
||||
iconSize: [30, 45],
|
||||
iconAnchor: [12, 41],
|
||||
iconAnchor: [27, 41],
|
||||
popupAnchor: [1, -34],
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user