Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
rm parent cats |
||
(18 intermediate revisions by 7 users not shown) | |||
Line 1:
{{documentation subpage}}
{{
Shows an image of a map, and draws user-specified images/icons on top of it using latitude/longitude coordinates.
{| class="wikitable"
|-
Line 7 ⟶ 8:
|-
| '''Simple map with a single marker, custom size, and no minimap'''<br>
{{
{ "lat": 37.8, "lon": -122.4 }
}}</nowiki> | lang=
| {{ {{BASEPAGENAME}} | width=400 | height=150 | lat=37.8 | lon=-122.4 | zoom=5 | minimap=false |
{ "lat": 37.8, "lon": -122.4 }
Line 17 ⟶ 18:
|-
| '''Two markers with labels - one as diamond shape, one uses an image from Commons'''<br>''Text label can be customized with all of [https://github.com/vega/vega/wiki/Marks#text Vega text mark] parameters by prepending "text" to their name''<br>
{{
{"lat": 40.816667, "lon": 14.433333, "
{"lat": 40.948333, "lon": 15.635556, "img": "
}}</nowiki> | lang=
| {{ {{BASEPAGENAME}} | lat=40.948333 | lon=15.635556 | zoom=6 |
{"lat": 40.816667, "lon": 14.433333, "
{"lat": 40.948333, "lon": 15.635556, "img": "
}}
|-
| '''One marker with labels on a blank map'''<br>
| '''Show all Armenian heritage sites''', by querying it from Wikidata<br>''The query result should have the same columns (fields) as in the other examples (<tt>text, img, ...</tt>), except coordinates should be returned as <tt>coord</tt> column''▼
{{
{"lat": 40.816667, "lon": 14.433333, "shape": "diamond", "size": 70, "offsetY": -10, "text": "Mount Vesuvius", "textFontWeight": "bold", "textFontSize": 16, "textColor": "#2A4B8D"},
}}</nowiki> | lang=wikitext}}
| {{ {{BASEPAGENAME}} | style=osm | lat=40.948333 | lon=15.635556 | zoom=6 |
{"lat": 40.816667, "lon": 14.433333, "shape": "diamond", "size": 70, "offsetY": -10, "text": "Mount Vesuvius", "textFontWeight": "bold", "textFontSize": 16, "textColor": "#2A4B8D"},
}}
|-
| '''Data from Commons Dataset'''<br>''Same as above, but this time the data is stored on Commons in a table [[commons:Data:Sandbox/Yurik/Street map with marks sample.tab|Data:Sandbox/Yurik/Street map with marks sample.tab]]''<br>
{{sxhl |<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | lat=40.948333 | lon=15.635556 | zoom=6 | table=Sandbox/Yurik/Street map with marks sample.tab}}</nowiki> | lang=wikitext}}
| {{ {{BASEPAGENAME}} | lat=40.948333 | lon=15.635556 | zoom=6 | table=Sandbox/Yurik/Street map with marks sample.tab}}
|-
▲| '''Show all Armenian heritage sites''', by querying it from Wikidata<br>''The query result should have the same columns (fields) as in the other examples (<
{{sxhl |<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | lat=40.347 | lon=47.260 | zoom=6 | colorScaleField=type | wdqs=
# Each ___location should show only once. This query may output all the same values as in the other examples, such as "text", "img", and others.
SELECT (SAMPLE(?coord) as ?coord) (SAMPLE(?type) as ?type)
Line 52 ⟶ 67:
}}
|-
| {{
{
"lat": -33.8688,
"lon": 151.2093,
"img": "
"width": 48,
"height": 36,
Line 66 ⟶ 81:
"textDx": -30
}
}}</nowiki> | lang=
| {{ {{BASEPAGENAME}} | lat=-33.8688 | lon=151.2093 | zoom=10 |
{
"lat": -33.8688,
"lon": 151.2093,
"img": "
"width": 48,
"height": 36,
Line 137 ⟶ 152:
|}
==See also==
* [[Template:Location map]]
* [[Template:OSM Location map]] - to use this mapping template with standard wikipedia syntax
* [[Template:Query map]] - automtically produce a map showing all of a certain type of thing in a certain area, e.g. lighthouses in Cornwall.
==Template data==
<templatedata>
{
Line 181 ⟶ 202:
"description": "If set, 0 or false will always hide the map, and 1 or true will always show it. Make sure the map is big enough include the minimap. By default, the map will be shown for zoom levels 5+ if the map is sufficiently large",
"type": "boolean"
},
"lang": {
"description": "The language code of the language to use to draw the labels on the map. Use special value 'local' to draw the labels in the language of the area being depicted. Uses the page language by default.",
"type": "string"
}
},
"paramOrder": [
Line 191 ⟶ 216:
"lon",
"zoom",
"lang",
"wdqs",
"colorScaleField",
Line 198 ⟶ 224:
}
</templatedata>
{{
<includeonly> {{sandbox other||
[[Category:Graph Template Collection]]
}} </includeonly>
|