Vorlage:Buslinie: Unterschied zwischen den Versionen

Aus TUEpedia
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(43 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
{{#get_web_data:url=https://www.tuepedia.de/img/bus_route.php?id=2181882|format=csv|data=name=1}}
<noinclude>
{{#for_external_table:* [[{{{name}}} (Bushaltestelle)]]}}
<code><nowiki>{{Buslinie|</nowiki>''id''<nowiki>}}</nowiki></code>
wobei ''id'' die ID der OpenStreetMap-Relation für die Busroute ist.
 
'''[http://overpass-turbo.eu/s/CRL Karte aller Buslinien in Tübingen mit ihren Relations-IDs]'''
</noinclude>
 
<includeonly>{{#get_web_data:
url=https://www.openstreetmap.org/api/0.6/relation/{{{1}}}
|format=XML
|data=name=/osm/relation/tag[@k='name']/@v,from=/osm/relation/tag[@k='from']/@v,to=/osm/relation/tag[@k='to']/@v,network=/osm/relation/tag[@k='network']/@v,ref=/osm/relation/tag[@k='ref']/@v,operator=/osm/relation/tag[@k='operator']/@v,symbol=/osm/relation/tag[@k='symbol']/@v,colour=/osm/relation/tag[@k='colour']/@v
|use xpath
|cache seconds=120
}}<table class="busline">
<tr><td colspan="2" class="headline"><div class="bus-ref-label">Buslinie</div><div class="bus-ref" style="background-color: {{#external_value:colour}}">{{#external_value:ref}}</div><img class="symbol" src="https://www.swtue.de/fileadmin/user_upload/3Fahrgaeste/Symbole/{{#external_value:symbol}}.bmp" title="Symbol der Buslinie" /></td></tr>
<tr><td colspan="2" class="from-to">{{#external_value:from}} &rarr; {{#external_value:to}}</td></tr>
<!--{{#external_value:name}}-->
<!--{{#external_value:network}}-->
<!--{{#external_value:operator}}-->
{{#get_web_data:url=https://www.tuepedia.de/img/bus_route_geometry.php?&id={{{1}}}|format=csv|data=map_markers=1,map_lines=2|delimiter=#}}
<tr class="map"><td colspan="2">{{#display_map: {{#external_value:map_markers}} |lines={{#external_value:map_lines}} }}</td></tr>
{{#get_web_data:url=https://www.tuepedia.de/img/bus_route.php?id={{{1}}}|format=csv|data=name=1}}
{{#for_external_table: <tr class="stop"><td colspan="2" class="stop">[[{{{name}}} (Bushaltestelle)|{{{name}}}]]</td></tr>}}
</table>
<htmltag tagname="style">
<nowiki>
.busline {
    width: 300px;
    float: right;
    margin: 0 0 32px 32px;
    clear: right;
}
 
.busline .bus-ref-label {
    font-weight: 500;
    margin-right: 16px;
}
 
.busline .bus-ref {
    color: white;
    font-weight: 900;
    text-align: center;
    width: 32px;
    height: 32px;
    float: right;
}
 
.busline .bus-ref, .busline .bus-ref-label {
    display: inline-block;
    font-size: 18px;
    padding: 4px 0;
}
 
.busline .from-to {
    text-align: center;
    padding: 8px 0;
    font-style: italic;
}
 
.busline .symbol {
    float: right;
    margin: 4px 16px 4px 0;
    opacity: 0.9;
}
 
.busline tr.stop:nth-child(odd) {
    background-color: #e0e0e0;
}
 
.busline td.stop {
    padding: 4px 8px;
}
 
.busline .leaflet-popup-content-wrapper {
    border-radius: 0;
}
 
.busline .leaflet-popup-content {
    margin: 4px 8px;
}
 
.busline .leaflet-popup-content b:first-child {
    display: none;
}
 
.busline .leaflet-popup-content hr {
    display: none;
}
 
.busline .leaflet-popup-content p {
    margin: 0;
}
 
.busline a.leaflet-popup-close-button {
    display: none;
}
 
@media all and (max-width: 768px) {
    .busline {
        margin-left: 0;
        width: 100%;
    }
}
</nowiki>
</htmltag></includeonly>

Aktuelle Version vom 29. Oktober 2018, 23:05 Uhr

{{Buslinie|id}} wobei id die ID der OpenStreetMap-Relation für die Busroute ist.

Karte aller Buslinien in Tübingen mit ihren Relations-IDs