Jump to content

Module:Location map/doc

From Wikipedia, the free encyclopedia

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. For the maps available, please consult available maps.

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). "none" will be interpreted as an empty string (no caption). Location within MAPNAME
|pushpin_relief 0/false/off will cause the template to display the map defined as image (generally not a relief map). 1/true/on will cause the template to display the map defined as image1 (generally a relief map). Any non-zero numeric value such as 2 or 3 will display image2 or image3, if those images are defined. Any other non-empty value will cause display of image1. See the example at Location map+/relief. 0
|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 . See examples at Commons:Location markers and Commons:Category:Map icons. 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_maplink_marker Name of Maki marker image to display at the point feature in the Kartographer maplink. See mw:Maps/Icons for options. If not set, a plain marker will be shown without an image. N/A
|pushpin_maplink_marker_color Color code (Hex triplet) specifying marker background color for the Kartographer maplink. 5E74F3  
|pushpin_maplink_marker_size Size of the marker in the Kartographer maplink. Can be small, medium, or large. medium
|pushpin_map_size Determines the width of the map in pixels, overriding any default values; do not include px. 240

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]

See also

[edit]