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. For example, if the first unnamed parameter supplied to this template is "Japan", then this template uses the entry for Japan in Module:Location map/data/Japan if it exists, or Location map Japan otherwise, one of which contains the data needed to generate the composite image.


 * 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.
 * To create a map with more than one location mark use Location map+ or Location map many.

Available maps
There are over 1000 maps available. To find other maps:


 * Special:PrefixIndex/Module:Location map/data/ - Checked before a map template is searched for. New maps should be created here rather than creating new 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 definitions
See Creating a new map definition.

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.



Mark outside of map border, no caption


Caption, label_size, background, mark, marksize


AlternativeMap parameter


Relief parameter
Also demonstrates automatic positioning of label to the left, due to far right position of mark.





Same coordinates on different maps




Map that crosses 180° meridian

 * See Category:Location map templates crossing 180th meridian



Template data
{	"description": "This template places a location mark on a map.", "params": { "1": {			"label": "Map name", "type": "string", "required": true, "description": "The name of the map to be used" },		"width": { "label": "Map width", "type": "number", "description": "Determines the width of the map in pixels, overriding any default values. Do not include \"px\", for example: \"300\", not \"300px\"." },		"default_width": { "label": "Default width", "type": "number", "description": "Determines the default width of the map in pixels, intended for use by templates such as infoboxes. The default value is 240. Do not include \"px\". This value will be multiplied by the defaultscale parameter specified in individual map templates, if it exists, in order to achieve an appropriate size for vertical maps." },		"float": { "label": "Position", "type": "string", "description": "Specifies the position of the map on the page. Valid values are left, right, center and none. The default is right." },		"border": { "label": "Border color", "type": "string", "description": "Specifies the color of the map border. If set to none, no border will be generated. " },		"caption": { "label": "Map caption", "type": "string", "description": "The text of a caption to be displayed below the map. If caption is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If caption is not defined, the map will not be framed and a default caption will be generated." },		"alt": { "label": "Alt text", "type": "string", "description": "Alt text for map; used by screen readers." },		"relief": { "label": "Alternative map from template", "type": "string", "description": "Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as image1, which is usually a relief map." },		"AlternativeMap": { "label": "Alternative map not from template", "type": "string", "description": "Allows the use of an alternative map. The image must have the same edge coordinates as the map template." },		"overlay_image": { "label": "Overlay image", "type": "string", "description": "Allows an overlay to be superimposed on the map. This parameter is seldom used." },		"label": { "label": "Marker label", "type": "string", "description": "The text of the label to display next to the mark. A wiki link can be used." },		"label_size": { "label": "Label size", "type": "number", "description": "The font size to use for the label, given as a percentage of the normal font size. Do not include \"%\"." },		"label_width": { "label": "Label width", "type": "number", "description": "The width to use for the label, given as an em size. Do not include \"em\"." },		"position": { "label": "Label position", "type": "string", "description": "The position of the label relative to the mark. Valid values are left, right, top and bottom. This defaults to either left or right, depending on the coordinates of the marker and its position relative to the right border of the map image." },		"background": { "label": "Label background", "type": "string", "description": "The background color to use for the label." },		"mark": { "label": "Marker image", "type": "string", "description": "The name of an image to display as the marker." },		"marksize": { "label": "Marker size", "type": "number", "description": "The size of the mark in pixels. Do not include \"px\"." },		"link": { "label": "Marker link", "type": "string", "description": "Specifies a wiki link which will be followed if the reader clicks on the mark." },		"lat_deg": { "label": "Latitude degrees", "type": "number", "required": true, "description": "The degrees of latitude. This value can be specified using decimal degrees. When this format is used minutes and seconds should not be specified." },		"lat_min": { "label": "Latitude minutes", "type": "number", "description": "The minutes of latitude." },		"lat_sec": { "label": "Latitude seconds", "type": "number", "description": "The seconds of latitude." },		"lat_dir": { "label": "Latitude direction", "type": "string", "description": "N if north or S for south of the Equator. Not required if using signed decimal degrees." },		"lon_deg": { "label": "Longitude degrees", "type": "number", "required": true, "description": " The degrees of longitude. This value can be specified using decimal degrees. When this format is used minutes and seconds should not be specified." },		"lon_min": { "label": "Longitude minutes", "type": "number", "description": "The minutes of longitude." },		"lon_sec": { "label": "Longitude seconds", "type": "number", "description": "The seconds of longitude." },		"lon_dir": { "label": "Longitude direction", "type": "string", "description": "E for east or W for west of the Prime Meridian. Not required if using signed decimal degrees." }	} }