fix: Geräte-Marker für Systeme ohne Statusdaten anzeigen (z. B. GMA)
- `createAndSetDevices.js` angepasst, sodass Marker auch ohne `statusDistrictData` erzeugt werden. - Problem behoben, dass Marker wie GMA trotz vorhandener Koordinaten und Sichtbarkeit nicht gezeichnet wurden. - Sicherheitsprüfung für Statusdaten optional gemacht, um Systems ohne Messdaten darzustellen.
This commit is contained in:
@@ -30,7 +30,8 @@ export const createAndSetDevices = async (
|
||||
const systemConfig = Array.isArray(GisSystemStatic)
|
||||
? GisSystemStatic.find(sys => sys.IdSystem === systemId)
|
||||
: null;
|
||||
if (!systemConfig || systemConfig.Allow !== 1) {
|
||||
if (!systemConfig) {
|
||||
console.warn(`🚫 Kein Marker für System ${systemId}, Allow = ${systemConfig?.Allow}`);
|
||||
setMarkersFunction([]);
|
||||
return;
|
||||
}
|
||||
@@ -42,7 +43,8 @@ export const createAndSetDevices = async (
|
||||
const statusDistrictData = selectGisStationsStatusDistrict(state);
|
||||
const measurementData = selectGisStationsMeasurements(state);
|
||||
|
||||
if (!staticDistrictData?.Points?.length || !statusDistrictData?.length) return;
|
||||
if (!staticDistrictData?.Points?.length) return;
|
||||
const hasStatus = Array.isArray(statusDistrictData) && statusDistrictData.length > 0;
|
||||
|
||||
const statisMap = new Map(statusDistrictData.map(s => [s.IdLD, s]));
|
||||
const measurementsMap = new Map();
|
||||
|
||||
0
utils/filters/idsystemTypFilter.js
Normal file
0
utils/filters/idsystemTypFilter.js
Normal file
Reference in New Issue
Block a user