add: add linescolor from API
This commit is contained in:
@@ -2088,11 +2088,13 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
try {
|
||||
const response = await fetch(webserviceGisLinesStatusUrl);
|
||||
const data = await response.json();
|
||||
console.log("data.Statis: ", data);
|
||||
const colorsByModule = {};
|
||||
data.Statis.forEach((item) => {
|
||||
colorsByModule[item.Modul] = item.PrioColor;
|
||||
});
|
||||
setLineColors(colorsByModule);
|
||||
console.log("colorsByModule", colorsByModule);
|
||||
} catch (error) {
|
||||
console.error("Fehler beim Abrufen der linesColorApi Daten:", error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user