Template:Highway system OSM map
"type": "ExternalData",
"service": "geoline",
"properties": {
"stroke-width": {{#if:{{{stroke-width|}}}|{{{stroke-width}}}|3}}
},
"query": "
SELECT ?id ?length
(if(?id = wd:{{wikidata|label|raw}}, '#C12838', '#07c63e') as ?stroke)
(concat('Line length: ', str(?length), ' km') as ?description)
(if(BOUND(?link),
concat('', substr(str(?link),31,500), '{{!}}', ?idLabel, ''),
?idLabel)
as ?title)
WHERE {
{?id wdt:P16 wd:{{#if:{{{highway_system_qid|}}}|{{{highway_system_qid}}}|{{wikidata|property|raw|P16}}}}.}
{{#if:{{{length|}}}| OPTIONAL { ?id wdt:P2043 ?length. } }}
SERVICE wikibase:label {
bd:serviceParam wikibase:language 'en' .
?id rdfs:label ?idLabel .
}
OPTIONAL {?link schema:about ?id.
?link schema:isPartOf
} GROUP BY ?id ?link ?idLabel ?length
"}|plain={{{plain|}}}|zoom={{{zoom|}}}|type=|id=|stroke-color=|stroke-width={{{stroke-width|3}}}|frame-lat={{{frame-lat|}}}|frame-long={{{frame-long|}}}|frame-width={{{frame-width|}}}|frame-height={{{frame-height|}}}|text={{{text|}}}|frame-align={{{frame-align|center}}}
}}
{{doc}}