Template:Rapid transit OSM map/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 6:
"stroke-width": {{{stroke-width|3}}}
},
"query": "SELECT (1 AS ?order) ?id
(if(BOUND(?idhexcolor), concat('#', str(?idhexcolor)), if(BOUND(?hexcolor), concat('#', str(?hexcolor)), '#07c63e')) as ?stroke)
(concat('Line length: ', str(?length), ' km') as ?description)
Line 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)}}
"},
{{#if:{{{stations|}}}|{
Line 34 ⟶ 35:
"properties": { "marker-symbol": "{{{marker-symbol|rail-metro}}}",
"marker-size" : "{{{marker-size|small}}}"},
"query": "SELECT DISTINCT (0 AS ?order) ?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)