Content deleted Content added
No edit summary Tag: Reverted |
No edit summary |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 1:
<includeonly>{{maplink|frame=yes|raw=
{
"type": "ExternalData",
"service": "geoline",
Line 5 ⟶ 6:
"stroke-width": {{{stroke-width|3}}}
},
"query": "SELECT ?id
(if(BOUND(?idhexcolor), concat('#', str(?idhexcolor)), if(BOUND(?hexcolor), concat('#', str(?hexcolor)), '#07c63e')) as ?stroke)
)▼
(concat('Line length: ', str(?length), ' km') as ?description)
▲ concat('[[', substr(str(?link),31,500), '{{!}}', ?idLabel, ']]'),
?idLabel)▼
WHERE {
VALUES ?sys { wd:{{#if:{{{system_qid|{{{1|}}}}}}|{{{system_qid|{{{1|}}}}}}|{{wikidata|label|raw}}}} {{#if:{{{system_qid2|{{{2|}}}}}}|wd:{{{system_qid2|{{{2|}}}}}} {{#if: {{{system_qid3|{{{3|}}}}}}|wd:{{{system_qid3|{{{3|}}}}}} {{#if:{{{system_qid4|{{{4|}}}}}}|wd:{{{system_qid4|{{{4|}}}}}} {{#if:{{{system_qid5|{{{5|}}}}}}|wd:{{{system_qid5|{{{5|}}}}}}}}}}}}}}
{
?id p:P5817/ps:P5817 wd:Q55654238
wdt:P16{{#if:{{{single_line|}}}|*}}/wdt:P361* ?sys.
}
{▼
?id p:P16/ps:P16/wdt:P279* ?sys .▼
}▼
MINUS {
VALUES ?rem { wd:Q548662 wd:Q55697304 }
?id wdt:P31/wdt:P279* ?rem. }
OPTIONAL { ?id wdt:P465 ?idhexcolor. }
OPTIONAL { ?id wdt:P462/wdt:P465 ?
?color wdt:P465 ?hexcolor.}▼
SERVICE wikibase:label {
bd:serviceParam wikibase:language 'en' .
Line 43 ⟶ 28:
?link schema:isPartOf <https://en.wikipedia.org/> . }
} GROUP BY ?id ?link ?idLabel ?length ?hexcolor ?idhexcolor
{{#if:{{{stations|}}}|ORDER BY if(?id=wd:{{{stations|}}},1,2)}}
"},
"}|plain={{{plain|yes}}}|zoom={{{zoom|}}}|type=|id=|frame-lat={{{frame-lat|}}}|frame-long={{{frame-long|}}}|frame-width={{{frame-width|}}}|frame-height={{{frame-height|}}}|text={{{text|}}}|frame-align={{{frame-align|center}}}|display={{{display|}}}▼
{{#if:{{{stations|}}}|{
}}</includeonly><noinclude>▼
"type": "ExternalData",
"service": "geopoint",
"properties": { "marker-symbol": "{{{marker-symbol|rail-metro}}}",
"marker-size" : "{{{marker-size|small}}}"},
"query": "SELECT DISTINCT ?id ?geo ?marker_color
(if(BOUND(?image), concat('[[File:', substr(str(?image), 52, 400), '{{!}}300px]]'), ?typeLabel) as ?description)
(if(BOUND(?link), concat('[[', substr(str(?link),31,500), '{{!}}', ?idLabel, ']]'), ?idLabel) as ?title)
WHERE {
VALUES ?sqid { wd:{{{stations_qid|{{wikidata|label|raw}}}}} }
▲ {
?id p:P5817/ps:P5817 wd:Q55654238;
wdt:P81/wdt:P16*{{!}}wdt:P1192/wdt:P16* ?sqid;
wdt:P625 ?geo.
VALUES ?not { wd:Q6501349 }
OPTIONAL { ?id wdt:P18 ?image. }
OPTIONAL { ?sqid wdt:P465 ?idhexcolor. }
BIND({{#if:{{{marker-colour|}}}|'{{{marker-colour}}}'|{{#if:{{{marker-color|}}}|'{{{marker-color}}}'|COALESCE(?idhexcolor,?hexcolor,'5c72f2')}}}} as ?marker_color)
SERVICE wikibase:label {
bd:serviceParam wikibase:language 'en' .
▲ }
OPTIONAL {?link schema:about ?id.
?link schema:isPartOf <https://en.wikipedia.org/> . }
}"
}
▲
}}
{{Clear left}}
{{documentation}}
</noinclude>
|