Difference between revisions of "Template:Italy Labelled Map/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Begoon
(old version)
imported>Begoon
(Undid revision 905312158 by Begoon (talk))
Line 1: Line 1:
<div style="text-shadow:white 0em 0em 0.4em; font-family:Cambria, Georgia, Times, 'Times New Roman', serif;">
+
{{#tag:mapframe|
{{Image label begin|image=Italian regions provinces white no labels.svg|link=|width={{{width|455}}}|float={{{float|none}}}}}
+
{
{{Image label small|x=0.80|y=0.70|scale={{{width|450}}}|text=[[Apulia]]}}
+
  "type": "ExternalData",
{{Image label small|x=0.77|y=0.77|scale={{{width|450}}}|text=[[Basilicata]]}}
+
  "service": "geoshape",
{{Image label small|x=0.77|y=0.88|scale={{{width|440}}}|text=[[Calabria]]}}
+
  "properties": {
{{Image label small|x=0.61|y=1.06|scale={{{width|430}}}|text=''[[Sicily]]''}}
+
    "stroke-width": 1
{{Image label small|x=0.63|y=0.63|scale={{{width|450}}}|text=[[Molise]]}}
+
  },
{{Image label small|x=0.64|y=0.72|scale={{{width|440}}}|text=[[Campania]]}}
+
  "query": "
{{Image label small|x=0.58|y=0.55|scale={{{width|450}}}|text=[[Abruzzo]]}}
+
 
{{Image label small|x=0.48|y=0.60|scale={{{width|450}}}|text=[[Lazio]]}}
+
SELECT ?id ?population
{{Image label small|x=0.47|y=0.49|scale={{{width|450}}}|text=[[Umbria]]}}
+
  ( '#C12838' as ?fill)
{{Image label small|x=0.53|y=0.43|scale={{{width|450}}}|text=[[Marche]]}}
+
  (concat('Population: ', str(?population)) as ?description)
{{Image label small|x=0.37|y=0.45|scale={{{width|450}}}|text=[[Tuscany]]}}
+
  (concat('[[', substr(str(?link),31,500),  '{{!}}', ?stateLabel, ']]') as ?title)
{{Image label small|x=0.20|y=0.80|scale={{{width|450}}}|text=''[[Sardinia]]''}}
+
WHERE {
{{Image label small|x=0.33|y=0.33|scale={{{width|450}}}|text=[[Emilia-Romagna]]}}
+
  {?id wdt:P31 wd:Q1710033.}  
{{Image label small|x=0.18|y=0.34|scale={{{width|475}}}|text=[[Liguria]]}}
+
  union
{{Image label small|x=0.09|y=0.28|scale={{{width|450}}}|text=[[Piedmont]]}}
+
  {?id wdt:P31 wd:Q16110. }
{{Image label small|x=0.50|y=0.13|scale={{{width|465}}}|text=''[[Friuli-Venezia Giulia|Friuli-<br />Venezia Giulia]]''}}
+
  OPTIONAL { ?id wdt:P1082 ?population. }
{{Image label small|x=0.08|y=0.18|scale={{{width|480}}}|text=''[[Aosta Valley|Aosta<br />Valley]]''}}
+
  SERVICE wikibase:label {
{{Image label small|x=0.347|y=0.115|scale={{{width|455}}}|text=''[[Trentino Alto Adige|Trentino-<br />Alto Adige]]''}}
+
    bd:serviceParam wikibase:language 'en' .
{{Image label small|x=0.43|y=0.20|scale={{{width|450}}}|text=[[Veneto]]}}
+
    ?id rdfs:label ?stateLabel .
{{Image label small|x=0.24|y=0.21|scale={{{width|450}}}|text=[[Lombardy]]}}
+
  }
{{Image label small|x=0.75|y=0.55|scale={{{width|400}}}|text=[[Adriatic Sea|<span style="font-style: italic; color: #48A3B5;">Adriatic Sea</span>]]}}
+
  ?link schema:about ?id.
{{Image label small|x=0.98|y=1.09|scale={{{width|400}}}|text=[[Ionian Sea|<span style="font-style: italic; color: #48A3B5;">Ionian Sea</span>]]}}
+
  ?link schema:isPartOf <https://en.wikipedia.org/> .
{{Image label small|x=0.18|y=1.19|scale={{{width|400}}}|text=[[Mediterranean Sea|<span style="font-style: italic; color: #48A3B5;">Mediterranean Sea</span>]]}}
+
} GROUP BY ?id ?link ?stateLabel ?population
{{Image label small|x=0.38|y=0.89|scale={{{width|400}}}|text=[[Tyrrhenian Sea|<span style="font-style: italic; color: #48A3B5;">Tyrrhenian Sea</span>]]}}
+
 
{{Image label small|x=0.17|y=0.45|scale={{{width|440}}}|text=[[Ligurian Sea|<span style="font-style: italic; color: #48A3B5;">Ligurian Sea</span>]]}}
+
"}
{{Image label end}}
+
|frameless
</div>
+
|align="{{{float|right}}}"
<noinclude>
+
|latitude="41.8"
{{Documentation|Template:Image label begin/doc}}
+
|longitude="12.0"  
 +
|zoom="5"
 +
|width="300"
 +
|height="350"
 +
}}<noinclude>
 
</noinclude>
 
</noinclude>

Revision as of 10:10, 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>