Content deleted Content added
←Created page with '{{OSM Location map/ModuleSandbox|coord = {{coord|51.86|4.36}}|zoom= 13 |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 { ?id wdt:P136 wd:Q557141; wdt:P625 ?geo; (wdt:P276*) wd:Q2103147; wdt:P31 ?type...' |
test of multiple display methods on same map works really well - I can't wait until the raw functionality goes live even with its parsing limitations |
||
(16 intermediate revisions by 3 users not shown) | |||
Line 1:
{{OSM Location map
| coord = {{coord|-41.2|172.6}} <!--latitude/longitude coordinates for map's center -->
| zoom = 8 <!--zoom 0=whole world, 18=a street.-->
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 {▼
| height = 350
| width = 300
| map-raw={{Wikipedia:Map data/Geology and geomorphology of Kahurangi National Park}}
| map-data-inverse=Q1429722
| mark-coord1={{Coord|-41.2|172.41}}
| mark-size1 = 0
| label-pos1=center
| label-angle1 = 0
| label-size1 = 8
| label1=Kahurangi^National Park
| minimap = file bottom right
| mini-file = New Zealand relief map.jpg
| mini-width = 65
| mini-height = 88
| minipog-gx = 51
| minipog-gy = 49
| title = Orientation map for faults near Kahurangi National Park{{legend-line|red solid 2px|(red) Active faults|inline=no}} {{legend-line|#444444 solid 2px|(dark grey) Selected inactive faults|inline=no}}{{legend-line|black solid 4px|(black) Antoki Fault|inline=no}}Click on map to enlarge it, and enable mouse over of fault names, noting that many known inactive faults are not shown and may be fault zones rather than simple faults.
}}
{{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 all complete geoJson elements in two database files
|fullscreen-text=Some text to go on the fullscreen page
}}
{{OSM Location map|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, "
?id wdt:P136 wd:Q557141;
wdt:P625 ?geo;
Line 14 ⟶ 43:
}
ORDER BY (?id)
|shape-color1=#800000|shape1=circle|mark-coord1={{coord|0|0}}|mark-title1=none
|shape-color2=#000080|mark-coord2={{coord|0|0}}|mark-title2=none
|shape-color3=#008000|mark-coord3={{coord|0|0}}|mark-title3=none
| legendBox=Public Art in Hoogvliet,118px70px1px, 268px50px <!--text, size, position,background color, text/outline color, param options)-->
| legendItem1=Sculpture,1
| legendItem2=Relief sculpture,2
| legendItem3=Other,3
| caption= Example using both map-data (for boundary line) and map-wdqs for geopoints from wikidata
}}
{{OSM Location map|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;
wdt:P6 ?head.
?head wdt:P102 ?party.
BIND(IF(?party = wd:Q29468, "0", IF(?party = wd:Q29552, "1", "2")) AS ?partyId)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
?head rdfs:label ?headLabel.
?id rdfs:label ?stateLabel.
}
OPTIONAL { ?head wdt:P18 ?img. }
?link schema:about ?head;
schema:isPartOf <https://en.wikipedia.org/>.
}
GROUP BY ?id ?head ?headLabel ?link ?stateLabel
| caption= Example using map-wdqs to add geoshapes from wikidata
}}
|