Spring til indhold

Bruger:Dipsacus fullonum/sandkasse-geoshape

Fra Wikipedia, den frie encyklopædi
<mapframe>: Couldn't parse JSON: Kontroltegnfejl, muligvis fejlagtigt kodet

Some of the links are red and some are blue, but all the linked pages to municiplaties and mayors exist.

Code:

<mapframe latitude="56.25" longitude="9.5" zoom="8" width="550" height="420"
 text="Danish municipalities in Region Midtjylland">
{
  "type": "ExternalData",
  "service": "geoshape",
  "query": "
SELECT
    ?id
    (concat('[[', substr(str(?idLink), 31), '|', ?idLabel, ']]') as ?title)
    (concat('Mayor: ',
            if(bound(?mayorLink),
               concat('[[', substr(str(?mayorLink), 31), '|', ?mayorLabel, ']]'),
               ?mayorLabel)) as ?description)
WHERE {
    ?id wdt:P31 wd:Q2177636 ;
        wdt:P131 wd:Q26586 ;
        wdt:P6 ?mayor .
    ?idLink schema:about ?id ;
            schema:isPartOf <https://da.wikipedia.org/> .
    OPTIONAL { ?mayorLink schema:about ?mayor ;
                          schema:isPartOf <https://da.wikipedia.org/> . } 
    SERVICE wikibase:label {
            bd:serviceParam wikibase:language 'da'.
            ?id rdfs:label ?idLabel .
            ?mayor rdfs:label ?mayorLabel . }
}
"}
</mapframe>