From Wikipedia, the free encyclopedia
This helper template provides a way to display a map in an Infobox. Optionally a location marker can be included.
Dette er dokumentationsundersiden til Skabelon:Infobox map. Denne side indeholder information om brug, kategorier samt andet indhold, som ikke er en del af den oprindelige skabelonside. |
This template will generate an error message and garbage if it is transcluded with {{{map}}} undefined. This reduces expansion depth which is critical in many infoboxes that transclude this template. |
The parameters {{{label_x}}} and {{{label_y}}} are deprecated. They will remain functional for a time. |
Field name | Description |
---|---|
map | The name of the map to be displayed. This is the only required parameter. |
map_width | The width of the map image to be displayed. For example, map_width=220 and not map_width=220px . |
default_width | When this template is used in another template, e.g. an infobox, the default width of the map image preferred by the infobox should be specified here. For example, map_width=220 . When used with location maps, this value may be modified by a certain value if specified in the location map template. The default value is 220px. |
relief | Selects a relief map when assigned any value. This only works when the geographical coordinates method is used and then only for a few maps. See Map display methods. |
map_alt | Alt text for the map. A visually impaired reader who uses a screen reader will have access to this text. See Wikipedia:ALT. |
map_caption | The caption that appears below the map if one is required. |
mark | The image file that will be used to mark the location on the map. The default is Red pog.svg. See below. |
mark_width | The width of the marker image to be displayed. For example, mark_width=8 and not mark_width=8px . The default width is 8px. |
label | A text message that will be displayed next to the marker. |
label_position | The position of a label with respect to the marker. Valid values are left , right , top , bottom and none . |
background | The background color for the label. If no value is assigned the background will be transparent. See Web colors. |
coordinates | The coordinates of the location in {{Coord}} format. While not recommended, if you want to waste time you can also enter them in decimal degrees (e.g. 48.067°N 12.863°E ). You shouldn't need to, though. |
lat long | Specifies the latitude and longitude of the location when the geographical coordinates method is used. This value may be specified as a signed decimal degree. |
lat_deg lat_min lat_sec lat_dir
|
Specifies the latitude and longitude of the location when the geographical coordinates method is used. This value may be specified in dms+hemisphere format. |
x y | Specifies the position of the location marker. The coordinates of the marker in pixels based on a map width of 1000 pixels. The template will scale these values for proper display. See below. |
x% y% | Specifies the position of the location marker. x% specifies the percentage of the distance across the image from the left edge and y% specifies the percentage of the distance down from the top edge. See below. |
There are three methods which can display a mark on a map. These examples use {{Infobox park}} which uses this template as a back end.
A marker can be superimposed on a map using one of a set of special map templates. To display a marker, the geographic coordinates must be specified using the {{Coord}} template inside the |coordinates=
parameter. See the documentation for {{Location map}}. The parameters for this template map to a subset of the parameters used by {{Location map}}. A map template can be found using these sources:
All of the names begin with the words "Location map" followed by the area covered. The value you need to specify is the area name. The map template for Canada is Location map/data/Canada. In this case specify |map=Canada
.
Four Corners, Canada | |
---|---|
Example using geographic coordinates | |
Koordinater | 60°00′00″N 102°00′00″V |
{{Infobox park | name = Four Corners, Canada | map = Canada | map_caption = Example using geographic coordinates | coordinates = {{coord|60|00|00|N|102|00|00|W|display=inline,title}} }}
By default, {{Coord}} displays in the infobox only in the page title. Parameter |display=inline,title
can be added to make the coordinates display at the top of the page as well.
x
and y
parametersThe values for the x
and y
parameters are the pixel coordinates of the location mark when the image is scaled to a width of 1000 pixels.
x
is the pixel offset for the mark from the left edge of an image 1000px wide.y
is the pixel offset for the mark from the top edge of an image 1000px wide.There are at least two ways of obtaining these values:
x
and y
parameters.{{Infobox park | name = Four Corners, Canada | map = Canada location map.svg | map_caption = Example using the x and y parameters | x = 369 | y = 487 }}
x%
and y%
parametersIn the following example the marker is 36.9% of the way across and 57.4% of the way down.
{{Infobox park | name = Four Corners, Canada | map = Relief map of Canada.png | map_caption = Example using the x% and y% parameters | x% = 36.9 | y% = 57.4 }}
Although deprecated in infoboxes in August 2016, it is still possible in this template to use the |lat_d=
, |lat_m=
, |lat_s=
, |lat_NS=
, |long_d=
, |long_m=
, |long_s=
and |long_NS=
parameters (for latitude degrees, minutes, seconds and direction; and longitude degrees, minutes, seconds and direction respectively).
An image can be displayed without a location mark, but this is rather pointless in most cases because a normal infobox image parameter can usually be used instead.
{{Infobox | above = | image2 = {{Infobox map | map = Braziloutput.png | map_alt = A world map showing regions that produce Brazil nuts. | map_caption = | map_width = 200 }} }}
A mark can be any image file. The default mark is Red pog.svg and it works well because it is easy to pick up visually on most maps. Some examples are below. Click on an image to see the file description page.
See Location markers for other examples. Currently, using mark_width=n
for n > 8 is not advised when a label is specified.
To display coordinates in the Infobox two methods can be used. The template {{Infobox coord}} can be used to display coordinates entered using the method discussed above. If the X,Y method is used to display a marker then the template {{coord}} can be used. For examples of coordinate entry see coordinate examples.
Infobox map
Parameter | Beskrivelse | Type | Status | |
---|---|---|---|---|
Map | map
| The name of the map to be displayed | Streng | påkrævet |
Map Width | map_width | The width of the map image to be displayed. | Tal | valgfri |
Default Width | default_width | When this template is used in another template, the default width is given using this parameter | Tal | valgfri |
Relief | relief | Selects a relief map when assigned any value | Streng | valgfri |
Map Alternative Text | map_alt | Alternative text to be displayed if the map isnt displayed for whatever reasons | Streng | valgfri |
Map Caption | map_caption | Caption for the map | Streng | valgfri |
Mark | mark | The image file that will be used to mark the location on the map | Sidenavn | valgfri |
Mark Width | mark_width | The width of the marker image to be displayed | Tal | valgfri |
Label | label | A text message that will be displayed next to the marker. | Streng | valgfri |
Label Position | label_position | The position of a label with respect to the marker | Streng | valgfri |
Latitude | lat | Latitude of the map | Tal | valgfri |
Longitude | long | Longitude of the map | Tal | valgfri |
X | x | Specifies the position of x location marker | Tal | valgfri |
Y | y | Specifies the position of y location marker | Tal | valgfri |
X% | x% | x% specifies the percentage of the distance across the image from the left edge | Tal | valgfri |
Y% | y% | y% specifies the percentage of the distance down from the top edge | Tal | valgfri |
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.