Module:Location map/doc
| This is a documentation subpage for Module:Location map. It may contain usage information, categories and other content that is not part of the original module page. |
| This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
| This Lua module is used on approximately 932,000 pages, or roughly 1% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
| This module depends on the following other modules: |
| This module uses TemplateStyles: |
Usage
[edit]This module implements the {{Location map}} and {{Location map~}} templates. Please see the template pages for usage instructions.
Infobox maps
[edit]To insert into an Infobox, simply add the following to automatically support pushpin maps.
| image2 = {{#invoke:Location map|infobox_pushpin_map}}
For the documentation, you can use {{Location map/doc/infobox parameters}} (which is displayed below). If any default values are modified in the #invoke calls, add them as parameters in the form |parameter_name=value.
Parameters
[edit]Below are the parameters used by Module:Location map to produce the pushpin map in this Infobox. These parameters are available for editors to set in articles that use this infobox.
| Parameter | Description | Default |
|---|---|---|
|pushpin_map=
|
The map(s) to display. For example, specifying England will use the values for England in Module:Location map/data/England.Multiple maps can be shown by providing a list of map names separated by #. For multiple maps, the first is shown by default. A reader can select the others with radio buttons.
|
N/A |
|pushpin_caption=
|
The text of a caption to be displayed below the map. If not provided a default caption will be generated. Multiple captions can be shown when separated by ## (that's two).
|
Location within MAPNAME |
|pushpin_relief=
|
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; see the example at Location map+/relief. Other numerical values such as 2 or 3 will display image2 or image3, if those images are defined.
|
N/A |
|pushpin_label=
|
The text of the label to display next to the identifying mark; a wikilink can be used. You can enclose the label inside of {{nowrap}} if you want to make sure that it stays on a single line. | N/A |
|pushpin_label_size=
|
The font size to use for the label, given as a percentage of the normal font size (<100=smaller, >100=larger); the default size is 90. Do not include %. For example, use |pushpin_label_size=80, not |pushpin_label_size=80%. If set to 0, the label is only displayed when the user hovers over the mark.
|
90 |
|pushpin_label_position=
|
The position of the label relative to the identifying mark; valid values are left, right, top, bottom and none. 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. When |pushpin_label_position=none, any defined label will not be displayed with the mark, but it will be used to create the default caption.
|
N/A |
|pushpin_mark=
|
The name of an image file to display as the identifying mark; the default is Red pog.svg |
Red pog.svg |
|pushpin_mark_size=
|
The size of the identifying mark in pixels. Do not include px | 8 |
|pushpin_alt=
|
Alt text for map; used by screen readers. See WP:ALT. | N/A |
|pushpin_background=
|
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. | N/A |
|pushpin_map_size=
|
Determines the width of the map in pixels, overriding any default values; do not include px. | N/A |
In addition, there are "hidden" parameters that can be set in an invocation to this module, but are not exposed as parameters in a calling infobox:
|float=--- the location map floats within the infobox, set its alignment. Defaults to "center"|border=--- sets the border color of the map. Defaults to "infobox" which implements a standard border for an infobox|default_width=--- if the map width is not specified, uses this width. A bare number is interpreted in pixels|max_width=--- if the map width is specified in pixels, it cannot exceed this value (interpreted in pixels if bare).
Tracking/maintenance categories
[edit]- Category:Location maps with possible errors
- Category:Location maps with different longitude and latitude precisions (7)
- Category:Location maps with marks outside map and outside parameter not set (693)
- Category:Location maps with a name containing a pipe (21)
- Category:Location maps with removed parameters (0)
- Category:Location maps with negative degrees and minutes or seconds (17)
- Tracking for a change (see talk): Category:Pages using location map with a double number sign in the caption (5)