Files
nodeMap/docs/redux/api/fromWebService/fetchGisSystemStatic.md
ISA b847b5d2c8 docs: Projektstruktur der Dokumentation an Quellcode angepasst
- Verzeichnisstruktur unter /docs spiegelt nun die tatsächliche Projektstruktur wider
- frontend/server-Trennung entfernt zugunsten von /docs/pages, /docs/redux, /docs/utils etc.
- Erhöht Wiederauffindbarkeit, Übersichtlichkeit und Entwicklerfreundlichkeit
2025-05-27 09:30:40 +02:00

77 lines
1.8 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🌐 fetchGisSystemStatic Geräte-Systemdaten abrufen
## Zweck
Diese Funktion ruft die Gerätestatus-Übersicht für eine bestimmte Karte ab:
WebService-Endpunkt:
```
GisSystemStatic?idMap={idMap}&idUser={idUser}
```
---
## Besonderheit bei der URL
Die Webservices (z.B. `WebServiceMap.asmx`) laufen **immer auf Port 80**,
egal ob im Entwicklungsmodus (`localhost`, `:3000`) oder auf dem Testserver (`10.10.0.13`).
Daher wird im Code explizit `:80` gesetzt gesteuert über die Umgebungsvariable:
```env
NEXT_PUBLIC_API_PORT_MODE=dev
```
### Beispiel (aus dem Code):
```js
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
```
---
## Parameter
Die Funktion liest folgende URL-Parameter ein:
| URL-Parameter | Beschreibung | Übergabe durch TALAS.web |
| ------------- | ------------ | ------------------------ |
| `m` | Map-ID | Ja |
| `u` | User-ID | Ja |
Diese werden aus der URL wie folgt gelesen:
```js
const params = new URLSearchParams(window.location.search);
const idMap = params.get("m");
const idUser = params.get("u");
```
---
## Beispiel-Aufruf
TALAS-Aufruf:
```
http://10.10.0.13/talas5/MessagesMap/mapTypeC.aspx?m=12&u=484
```
wird im Webservice-Request zu:
```
http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx/GisSystemStatic?idMap=12&idUser=484
```
---
## Siehe auch
- `.env.local``NEXT_PUBLIC_API_PORT_MODE`
- `docs/fromWebService.md`
- API-Datei: `/redux/api/fromWebService/fetchGisSystemStatic.js`
- 📄 Pfad: `/docs/frontend/redux/api/fromWebService/fetchGisSystemStatic.md`