Altes Köln

Schulkarte: Unterschied zwischen den Versionen

Aus Altes Köln
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
== Schulkarte Diagnose ==
=== 1) Roh-SMW-Ausgabe ===
(zeigt, ob SMW überhaupt Daten liefert)
<pre>
[
{{#ask:
[[Kategorie:Schule]]
|?Schule=name
|?Koordinaten=coords
|?Schultyp=type
|format=list
|template=SchulJSON
|sep=,
|headers=hide
|plain=yes
|link=none
}}
]
</pre>
----
=== 2) JSON-Debugdaten für Script ===
<script id="smw-data" type="application/json">
<script id="smw-data" type="application/json">
[
[
Zeile 42: Zeile 16:
</script>
</script>


<div id="debug"
{{#widget:Leaflet}}
    style="white-space:pre-wrap;border:1px solid #933;background:#fee;
            padding:8px;margin-top:10px;font-size:0.9em">
Datenloader läuft …
</div>
 
<script>
(function(){
    var el = document.getElementById("smw-data");
    var dbg = document.getElementById("debug");
 
    if(!el){
        dbg.textContent = "❌ FEHLER: smw-data Element fehlt – Query wurde nicht erzeugt!";
        return;
    }
 
    var raw = el.textContent.trim();
    dbg.textContent = "✍ Rohdaten erhalten:\n\n" + raw;
 
    try {
        var json = JSON.parse(raw);
        dbg.textContent += "\n\n✔ JSON ist gültig – Beispiel erstes Objekt:\n" +
            JSON.stringify(json[0], null, 2);
    } catch(e){
        dbg.textContent += "\n\n❌ JSON FEHLER:\n" + e.message;
        dbg.textContent += "\n\nHinweis: Vermutlich wird {{#ask}} nicht geparst.";
    }
})();
</script>
 
----
 
=== Erklärung ===
* Feld 1 zeigt die SMW-Abfrage roh — wenn hier **{{#ask** sichtbar bleibt**, wird SMW nicht ausgeführt.
* Feld 2 wird vom Script eingelesen und als JSON validiert.

Version vom 7. Dezember 2025, 23:45 Uhr

<script id="smw-data" type="application/json"> [

{

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}


] </script>

Cookies helfen uns bei der Bereitstellung von Altes Köln. Durch die Nutzung von Altes Köln erklärst du dich damit einverstanden, dass wir Cookies speichern.