Template:OSM Location map/ModuleSandbox/doc: Difference between revisions

Content deleted Content added
Add a map-raw example - Solomon Sea plate
check on examples on live module
Line 1:
{{OSM Location map/ModuleSandbox|coord = {{coord|-8|153}}|zoom= 4|
|map-raw={{Wikipedia:Map data/Solomon Sea plate}},{{Wikipedia:Map data/New Britain subduction zone}}
|caption= example using 'map-raw' to add complete geoJson elements
}}
 
{{OSM Location map/ModuleSandbox|coord = {{coord|51.86|4.36}}|zoom= 13|map-data=Q2103147| map-data-width=5| map-data-color=dark red|map-data-text=town boundary
|map-wdqs-type=geopoint|map-wdqs=
SELECT DISTINCT ?id ?geo (?idLabel AS ?title) (IF(BOUND(?image), CONCAT(?typeLabel, "\n", "[[File:", SUBSTR(STR(?image), 52 , 400 ), "{{!}}200px]]"), ?typeLabel) AS ?description) (IF(?type = wd:Q860861, "#800000", IF(?type = wd:Q245117, "#000080", "#008000")) AS ?marker_color) WHERE {
Line 29:
}}
 
{{OSM Location map/ModuleSandbox|coord = {{coord|52|-110}}|zoom= 2|map-wdqs-type=geoshape||map-wdqs=
SELECT ?id ?head (SAMPLE(?img) AS ?img_) (MIN(?partyId) AS ?party) (IF(?party = "0", "#800000", IF(?party = "1", "#000080", "#008000")) AS ?fill) (CONCAT("[[w:", SUBSTR(STR(?link), 31 , 400 ), "{{!}}", ?headLabel, "]]") AS ?title) (CONCAT(?stateLabel, "\n", "[[File:", SUBSTR(STR(?img_), 52 , 400 ), "{{!}}200px]]") AS ?description) WHERE {
?id wdt:P31 wd:Q35657;