add: You can switch in /config/config.js linesColorApi or GisLinesStatus , locally or remotely API-Endpoint-Function from Webservice
This commit is contained in:
@@ -219,6 +219,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const mapGisStationsMeasurementsUrl = config.mapGisStationsMeasurementsUrl;
|
||||
const mapGisSystemStaticUrl = config.mapGisSystemStaticUrl;
|
||||
const mapDataIconUrl = config.mapDataIconUrl;
|
||||
const webserviceGisLinesStatusUrl = config.webserviceGisLinesStatusUrl;
|
||||
|
||||
const openVersionInfoModal = () => {
|
||||
setShowVersionInfoModal(true);
|
||||
@@ -2085,11 +2086,11 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
useEffect(() => {
|
||||
const fetchLinesColor = async () => {
|
||||
try {
|
||||
const response = await fetch("/api/linesColorApi");
|
||||
const response = await fetch(webserviceGisLinesStatusUrl);
|
||||
const data = await response.json();
|
||||
const colorsByModule = {};
|
||||
data.linesColor.Statis.forEach((item) => {
|
||||
colorsByModule[item.IdModul] = item.Co;
|
||||
data.Statis.forEach((item) => {
|
||||
colorsByModule[item.Modul] = item.PrioColor;
|
||||
});
|
||||
setLineColors(colorsByModule);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user