Difference between revisions of "Template:Italy Labelled Map/sandbox"
Jump to navigation
Jump to search
imported>Begoon (old version) |
imported>Begoon m (<noinclude> {{Documentation}} </noinclude>) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | {{#tag:mapframe| | |
| − | + | { | |
| − | + | "type": "ExternalData", | |
| − | + | "service": "geoshape", | |
| − | + | "properties": { | |
| − | + | "stroke-width": 1 | |
| − | {{ | + | }, |
| − | { | + | "query": " |
| − | { | + | |
| − | + | SELECT ?id ?population | |
| − | { | + | ( '#C12838' as ?fill) |
| − | { | + | (concat('Population: ', str(?population)) as ?description) |
| − | + | (concat('[[', substr(str(?link),31,500), '{{!}}', ?stateLabel, ']]') as ?title) | |
| − | + | WHERE { | |
| − | + | {?id wdt:P31 wd:Q1710033.} | |
| − | + | union | |
| − | + | {?id wdt:P31 wd:Q16110. } | |
| − | + | OPTIONAL { ?id wdt:P1082 ?population. } | |
| − | + | SERVICE wikibase:label { | |
| − | + | bd:serviceParam wikibase:language 'en' . | |
| − | + | ?id rdfs:label ?stateLabel . | |
| − | + | } | |
| − | + | ?link schema:about ?id. | |
| − | + | ?link schema:isPartOf <https://en.wikipedia.org/> . | |
| − | + | } GROUP BY ?id ?link ?stateLabel ?population | |
| − | + | ||
| − | + | "} | |
| − | + | |frameless | |
| − | + | |align="{{{float|right}}}" | |
| − | <noinclude> | + | |latitude="41.8" |
| − | {{Documentation | + | |longitude="12.0" |
| + | |zoom="5" | ||
| + | |width="300" | ||
| + | |height="350" | ||
| + | }}<noinclude> | ||
| + | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 23:39, 8 July 2019
<mapframe align="right" latitude="41.8" longitude="12.0" zoom="5" width="300" height="350"> {
"type": "ExternalData",
"service": "geoshape",
"properties": {
"stroke-width": 1
},
"query": "
SELECT ?id ?population
( '#C12838' as ?fill)
(concat('Population: ', str(?population)) as ?description)
(concat('', ?stateLabel, '') as ?title)
WHERE {
{?id wdt:P31 wd:Q1710033.}
union
{?id wdt:P31 wd:Q16110. }
OPTIONAL { ?id wdt:P1082 ?population. }
SERVICE wikibase:label {
bd:serviceParam wikibase:language 'en' .
?id rdfs:label ?stateLabel .
}
?link schema:about ?id.
?link schema:isPartOf <https://en.wikipedia.org/> .
} GROUP BY ?id ?link ?stateLabel ?population
"} </mapframe>
| 50px | This is the template sandbox page for Template:Italy Labelled Map (diff). See also the companion subpage for test cases. |
<mapframe align="right" latitude="41.8" longitude="12.0" zoom="5" width="300" height="350"> {
"type": "ExternalData",
"service": "geoshape",
"properties": {
"stroke-width": 1
},
"query": "SELECT ?id ?population ( '#C12838' as ?fill) (concat('Population: ', str(?population)) as ?description) (concat('', ?stateLabel, '') as ?title) WHERE { {?id wdt:P31 wd:Q1710033.} union {?id wdt:P31 wd:Q16110. } OPTIONAL { ?id wdt:P1082 ?population. } SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' . ?id rdfs:label ?stateLabel . } ?link schema:about ?id. ?link schema:isPartOf <https://en.wikipedia.org/> .} GROUP BY ?id ?link ?stateLabel ?population"
} </mapframe>
Alignment
- You can align the map right, left or center with
|float=right|float=leftor|float=center - If you don't supply
|float=the default is "right"
See also
| The above documentation is transcluded from Template:Italy Labelled Map/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |