feat: Create /config/layers.js module for Separate of Consern

This commit is contained in:
ISA
2024-07-10 08:27:00 +02:00
parent 34ad670ae1
commit 6c60700b7c
4 changed files with 42 additions and 35 deletions

View File

@@ -1,19 +1,19 @@
// /config/config.js
// BASE_URL für Station öffnen in neuer tab und gleicher tab, im localhost gab es keine Probleme mit der Frame
export const BASE_URL = "http://10.10.0.13/talas5/devices/";
//export const BASE_URL = "http://10.10.0.13/talas5/devices/";
//const baseUrl = "http://localhost:3000/talas5/devices/";
//const baseUrl = "http://192.168.10.14/talas5/devices/";
//----
//Talas_v5 Server
//export const OFFLINE_TILE_LAYER = "/mapTiles/{z}/{x}/{y}.png"; // wenn im von localhost also selben Server die Karte angezeigt wird
export const OFFLINE_TILE_LAYER = "/mapTiles/{z}/{x}/{y}.png";
//export const OFFLINE_TILE_LAYER = "/mapTiles/{z}/{x}/{y}.png";
//const onlineTileLayer = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
export const ONLINE_TILE_LAYER =
"http://10.10.0.13:3000/mapTiles/{z}/{x}/{y}.png"; //Talas_v5 Server
/* export const ONLINE_TILE_LAYER =
"http://10.10.0.13:3000/mapTiles/{z}/{x}/{y}.png"; //Talas_v5 Server */
// Create map layers
export const MAP_LAYERS = {
/* export const MAP_LAYERS = {
TALAS: new L.layerGroup(),
ECI: new L.layerGroup(),
ULAF: new L.layerGroup(),
@@ -27,7 +27,7 @@ export const MAP_LAYERS = {
Sonstige: new L.layerGroup(),
TALASICL: new L.layerGroup(),
lineLayer: new L.LayerGroup(),
};
}; */
// Definieren der grundlegenden Umgebungseinstellungen und Konfigurationen der Karte
const mapVersion = "0.5.3"; // Die Version der verwendeten Karte
const standardSideMenu = true; // Einstellung, ob ein standardmäßiges Seitenmenü verwendet wird

17
config/layers.js Normal file
View File

@@ -0,0 +1,17 @@
import L from "leaflet";
export const MAP_LAYERS = {
TALAS: new L.layerGroup(),
ECI: new L.layerGroup(),
ULAF: new L.layerGroup(),
GSMModem: new L.layerGroup(),
CiscoRouter: new L.layerGroup(),
WAGO: new L.layerGroup(),
Siemens: new L.layerGroup(),
OTDR: new L.layerGroup(),
WDM: new L.layerGroup(),
GMA: new L.layerGroup(),
Sonstige: new L.layerGroup(),
TALASICL: new L.layerGroup(),
lineLayer: new L.LayerGroup(),
};

4
config/settings.js Normal file
View File

@@ -0,0 +1,4 @@
// Definieren der grundlegenden Umgebungseinstellungen und Konfigurationen der Karte
export const MAP_VERSION = "0.5.3";
export const STANDARD_SIDE_MENU = true;
export const FULL_SIDE_MENU = false;