LineStop-Request
Listet alle durchfahrenen Haltestellen einer Linie bzw. Linienvariante in Reihenfolge auf.
Endpoint
- Pfad:
XML_LINESTOP_REQUEST
- Methode: GET
Parameter (Auszug)
Parameter | Typ | Beschreibung |
---|---|---|
lineId | string | Linien-ID inkl. Betreiber/Variante |
direction | string | Richtung/Headsign (optional) |
includeCoords | 0/1 | Koordinaten mitliefern |
Beispiel-Request
GET /XML_LINESTOP_REQUEST?lineId=VRR:196:A&includeCoords=1
Antwort (Beispiel)
json
{
"stops": [
{ "id": "de:05513:1001", "name": "Essen Hbf", "coord": { "lat": 51.4513, "lon": 7.0128 } },
{ "id": "de:05513:1010", "name": "Ziel" }
]
}
JavaScript-Beispiel
js
async function getLineStops(lineId, includeCoords = 1) {
const base = 'https://server:port/virtuellesVerzeichnis/XML_LINESTOP_REQUEST'
const usp = new URLSearchParams({ lineId, includeCoords: String(includeCoords) })
const res = await fetch(`${base}?${usp}`)
if (!res.ok) throw new Error('HTTP ' + res.status)
return res.json()
}
title: LineStop-Request (Halte einer Linie) outline: deep
LineStop-Request
Listet die durchfahrenen Haltestellen einer konkreten Linie/Variante.
Endpoint
- Pfad:
XML_LINESTOP_REQUEST
- Methode: GET
Parameter (Auszug)
Parameter | Typ | Beschreibung |
---|---|---|
lineId | string | Linien-ID oder -Bezeichnung (z. B. 196 ) |
directionId | string | Richtungs-/Kurs-ID |
includeCoords | 0/1 | Koordinaten der Halte mitliefern |
Beispiel-Request
GET /XML_LINESTOP_REQUEST?lineId=196&directionId=K&includeCoords=1
Antwort (Beispiel)
json
{
"stops": [
{ "id": "de:05513:1001", "name": "Essen Hbf", "coord": { "lat": 51.4513, "lon": 7.0128 } }
]
}
JavaScript-Beispiel
js
async function getLineStops(lineId, directionId, includeCoords = 1) {
const base = 'https://server:port/virtuellesVerzeichnis/XML_LINESTOP_REQUEST'
const usp = new URLSearchParams({ lineId, directionId, includeCoords: String(includeCoords) })
const res = await fetch(`${base}?${usp}`)
if (!res.ok) throw new Error('HTTP ' + res.status)
return res.json()
}