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

Content deleted Content added
add |map-data= to highlight bug (soon to be fixed); fix double escaping
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
 
(11 intermediate revisions by 2 users not shown)
Line 1:
{{OSM Location map
{{OSM Location map/ModuleSandbox|coord = {{coord|51.86|4.36}}|zoom= 13|map-data=Q2680952|map-wdqs-type=geopoint|map-wdqs=
| coord = {{coord|-41.2|172.6}} <!--latitude/longitude coordinates for map's center -->
| zoom = 8 <!--zoom 0=whole world, 18=a street.-->
| 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|51.86-8|4.36153}}|zoom= 134|map-data=Q2680952|map-wdqs-type=geopoint|map-wdqs=
|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, "\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;
Line 13 ⟶ 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/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;
Line 31 ⟶ 69:
}
GROUP BY ?id ?head ?headLabel ?link ?stateLabel
| caption= Example using map-wdqs to add geoshapes from wikidata
}}