Template:Location map/doc

This template generates a location map as a composite image consisting of a map and a location mark. Optionally a label and caption can be added.

Usage
Map image files are not accessed directly but by using an auxiliary map definition template. For example, if the first unnamed parameter supplied to this template is "Japan", then this template uses the auxiliary template, Location map Japan which contains the data needed to generate the composite image.

! colspan="2" style="background-color:lightblue" | Label and mark parameters ! Parameter ! Description
 * Please note:
 * Assigning any value to the parameter  causes the map to be displayed as a thumbnail image. If this parameter is not declared, the template will generate a default caption.
 * The coordinates are not checked. If the coordinates specified fall outside the area covered by the map image, the location mark will not display inside the image, however, it may be displayed somewhere else on the page.
 * Do not use  . Using  will usually cause a very large map to be displayed. Use
 * Required. Use the name of the map as the first unnamed parameter. For example, specify England to use the values in Location map England. See the examples below.
 * Determines the width of the map in pixels. The default is 240. Do not include, for example:  , not.
 * Specifies the position of the map on the page. Valid values are,  ,   and  . The default is  ''.
 * Specifies the color of the 1px map border. The default is lightgrey (see web colors). If set to, no border will be generated. This parameter is seldom used.
 * The text of a caption to be displayed below the map. Specifying a caption will cause the map to be displayed with a frame. If  is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If   is not defined, the map will not be framed and a default caption will be generated. The default caption is created from the   parameter (or the current page name if label not defined) and the   parameter from map definition template. See the examples below.
 * Alt text for map; used by screen readers, see WP:ALT.
 * Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as, which is usually a relief map. See the example at Location map+/relief.
 * Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap.
 * Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
 * Specifies the color of the 1px map border. The default is lightgrey (see web colors). If set to, no border will be generated. This parameter is seldom used.
 * The text of a caption to be displayed below the map. Specifying a caption will cause the map to be displayed with a frame. If  is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If   is not defined, the map will not be framed and a default caption will be generated. The default caption is created from the   parameter (or the current page name if label not defined) and the   parameter from map definition template. See the examples below.
 * Alt text for map; used by screen readers, see WP:ALT.
 * Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as, which is usually a relief map. See the example at Location map+/relief.
 * Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap.
 * Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
 * Alt text for map; used by screen readers, see WP:ALT.
 * Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as, which is usually a relief map. See the example at Location map+/relief.
 * Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap.
 * Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
 * Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap.
 * Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
 * Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap.
 * Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
 * Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
 * Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
 * The text of the label to display next to the mark. A wiki link can be used. The default if not specified is no label, just the marker.
 * The font size to use for the label, given as a percentage of the normal font size (<100 = smaller, >100 = larger). The default is 90. Do not include, for example:  , not.
 * The width to use for the label, given as an em size. The default is 6. Do not include, for example:  , not.
 * The position of the label relative to the mark. Valid values are,  ,   and  . The default is  ''.
 * The background color to use for the label. See Web colors. The default is no background color, which shows the map image behind the label.
 * The name of an image to display as the mark. The default is Red pog.svg (Red pog.svg). See examples at Location markers and Commons:Category:Map icons.
 * The size of the mark in pixels. The default is 8. Do not include, for example:  , not.
 * Specifies a wiki link which will be followed if the reader clicks on the mark. The name of the linked article is displayed when the mouse pointer hovers over the mark.
 * Required. The degrees of latitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.
 * The minutes of latitude.
 * The seconds of latitude. Usually not necessary.
 * N if north (default value) or S for south of the Equator. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for southern latitude).
 * Required. The degrees of longitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.
 * The minutes of longitude.
 * The seconds of longitude. Usually not necessary.
 * E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).
 * }
 * The name of an image to display as the mark. The default is Red pog.svg (Red pog.svg). See examples at Location markers and Commons:Category:Map icons.
 * The size of the mark in pixels. The default is 8. Do not include, for example:  , not.
 * Specifies a wiki link which will be followed if the reader clicks on the mark. The name of the linked article is displayed when the mouse pointer hovers over the mark.
 * Required. The degrees of latitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.
 * The minutes of latitude.
 * The seconds of latitude. Usually not necessary.
 * N if north (default value) or S for south of the Equator. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for southern latitude).
 * Required. The degrees of longitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.
 * The minutes of longitude.
 * The seconds of longitude. Usually not necessary.
 * E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).
 * }
 * The minutes of latitude.
 * The seconds of latitude. Usually not necessary.
 * N if north (default value) or S for south of the Equator. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for southern latitude).
 * Required. The degrees of longitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.
 * The minutes of longitude.
 * The seconds of longitude. Usually not necessary.
 * E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).
 * }
 * Required. The degrees of longitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.
 * The minutes of longitude.
 * The seconds of longitude. Usually not necessary.
 * E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).
 * }
 * The seconds of longitude. Usually not necessary.
 * E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).
 * }
 * E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).
 * }
 * E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).
 * }

Available map templates
There are over 1000 map templates available. To find other templates:


 * Template:Location map/List - some of the items listed here are redirects and a few templates may not function as expected
 * Category:Location map templates - templates sorted by category
 * Special:WhatLinksHere/Template:Location map/Info - a search that might help
 * Special:Prefixindex/Template:Location map - another search that might help

Creating new map definition templates
See Creating a new map template.

Default width and float, no label, default caption (decimal coordinates)


Note: When a label is not specified, the default caption is "Page name (Map name)", so if this example was viewed on a page named Pag, the default caption would be "Pag (Croatia)". Likewise, on a page named Pag (town), the default caption would be "Pag (town) (Croatia)".

Map with the default caption (degrees/minutes)


Note: When a label is specified, the default caption is "Label text (Map name)", seen as "Pag (Croatia)" in this example.

Marker/Label outside of Map


Map with a custom caption and text background


Map with enlarged marker and label


Map with no caption or border


Relief parameter




AlternativeMap parameter




Same coordinates on different maps




Map that crosses 180° meridian

 * See Category:Location map templates crossing 180th meridian



Additional examples
For similar examples, see the documentation at Template:Location map+, as well as:
 * Template:Location map+/relief, an example using the relief parameter
 * Template:Location map+/AlternativeMap, an example using the AlternativeMap parameter
 * Template:Location map+/overlay, an example using the overlay_image parameter