Template:Infobox mapframe/doc/parameters
Appearance
Lua error: Internal error: The interpreter exited with status 127.
- Basic parameters:{{#if:||
- mapframe – Specify yes or no to show or hide the map, overriding the default. Default: no
- mapframe-caption – Caption for the map. Default: blank (or if
|{{SAFESUBST:#if:mapframe-geomask|mapframe-geomask=}}is set, "Location in geomask's label") - mapframe-custom – Use a custom map instead of the automatic mapframe. Specify either a Lua error: Internal error: The interpreter exited with status 127. template, or another template that generates a mapframe map, or an image name. If used, the subsequent mapframe parameters will be ignored. Default: not specified}}
- {{#if:|id|mapframe-id or id or qid}} – Id (Q-number) of Wikidata item to use. Default: item for current page
- {{#if:||mapframe-coordinates or mapframe-coord or}} coordinates or coord – Coordinates to use, instead of any on Wikidata. Use the {{Coord}} template, e.g.
|{{SAFESUBST:#if:coord|coord=}}Lua error: Internal error: The interpreter exited with status 127.. Default: coordinates from Wikidata - {{#if:||mapframe-}}wikidata – Set to <syntaxhighlight lang="text" class="" style="" inline="1">yes</syntaxhighlight> to show shape/line features from the wikidata item, if any, when
|{{SAFESUBST:#if:coord|coord=}}is set. Default: not specified
- Customise which features are displayed:
- {{#if:||mapframe-}}shape – Turn off display of shape feature by setting to <syntaxhighlight lang="text" class="" style="" inline="1">none</syntaxhighlight>. Use an inverse shape (geomask) instead of a regular shape by setting to <syntaxhighlight lang="text" class="" style="" inline="1">inverse</syntaxhighlight>. Default: not specified
- {{#if:||mapframe-}}point – Turn off display of point feature by setting to <syntaxhighlight lang="text" class="" style="" inline="1">none</syntaxhighlight>. Force point marker to be displayed by setting to <syntaxhighlight lang="text" class="" style="" inline="1">on</syntaxhighlight>. Default: not specified
- {{#if:||mapframe-}}line – Turn off display of line feature by setting to <syntaxhighlight lang="text" class="" style="" inline="1">none</syntaxhighlight>. Default: not specified
- {{#if:||mapframe-}}geomask – Wikidata item to use as a geomask (everything outside the boundary is shaded darker). Can either be a specific Wikidata item (Q-number), or a property that specifies the item to use (e.g.
P17for {{#if:P17
| {{#switch:P
| Q | P = Lua error: Internal error: The interpreter exited with status 127. (P17) | #default = Lua error: Internal error: The interpreter exited with status 127. (QP17) }}
| {{#if:Lua error: Internal error: The interpreter exited with status 127.
| [[d:Special:EntityPage/Lua error: Internal error: The interpreter exited with status 127.|Lua error: Internal error: The interpreter exited with status 127. (Lua error: Internal error: The interpreter exited with status 127.)]] | (no entity) }}
}}, P131 for {{#if:P131
| {{#switch:P
| Q | P = Lua error: Internal error: The interpreter exited with status 127. (P131) | #default = Lua error: Internal error: The interpreter exited with status 127. (QP131) }}
| {{#if:Lua error: Internal error: The interpreter exited with status 127.
| [[d:Special:EntityPage/Lua error: Internal error: The interpreter exited with status 127.|Lua error: Internal error: The interpreter exited with status 127. (Lua error: Internal error: The interpreter exited with status 127.)]] | (no entity) }}
}}). Default: not specified
- {{#if:||mapframe-}}switcher – set to <syntaxhighlight lang="text" class="" style="" inline="1">auto</syntaxhighlight> or <syntaxhighlight lang="text" class="" style="" inline="1">geomasks</syntaxhighlight> or <syntaxhighlight lang="text" class="" style="" inline="1">zooms</syntaxhighlight> to enable Template:Switcher-style switching between multiple mapframes. Default: not specified
- <syntaxhighlight lang="text" class="" style="" inline="1">auto</syntaxhighlight> – switch geomasks found in {{#if:P276
- {{#if:||mapframe-}}switcher – set to <syntaxhighlight lang="text" class="" style="" inline="1">auto</syntaxhighlight> or <syntaxhighlight lang="text" class="" style="" inline="1">geomasks</syntaxhighlight> or <syntaxhighlight lang="text" class="" style="" inline="1">zooms</syntaxhighlight> to enable Template:Switcher-style switching between multiple mapframes. Default: not specified
| {{#switch:P
| Q | P = Lua error: Internal error: The interpreter exited with status 127. (P276) | #default = Lua error: Internal error: The interpreter exited with status 127. (QP276) }}
| {{#if:Lua error: Internal error: The interpreter exited with status 127.
| [[d:Special:EntityPage/Lua error: Internal error: The interpreter exited with status 127.|Lua error: Internal error: The interpreter exited with status 127. (Lua error: Internal error: The interpreter exited with status 127.)]] | (no entity) }}
}} and {{#if:P131 | {{#switch:P
| Q | P = Lua error: Internal error: The interpreter exited with status 127. (P131) | #default = Lua error: Internal error: The interpreter exited with status 127. (QP131) }}
| {{#if:Lua error: Internal error: The interpreter exited with status 127.
| [[d:Special:EntityPage/Lua error: Internal error: The interpreter exited with status 127.|Lua error: Internal error: The interpreter exited with status 127. (Lua error: Internal error: The interpreter exited with status 127.)]] | (no entity) }}
}} statements on the page's Wikidata item, searching recursively. E.g. an item's city, that city's state, and that state's country.
- <syntaxhighlight lang="text" class="" style="" inline="1">geomasks</syntaxhighlight> – switch between the geomasks specified as a comma-separated list of Wikidata items (Q-numbers) in the {{#if:||mapframe-}}geomask parameter
- <syntaxhighlight lang="text" class="" style="" inline="1">zooms</syntaxhighlight> – switch between "zoomed in"/"zoomed midway"/"zoomed out", where "zoomed in" is the default zoom (with a minimum of <syntaxhighlight lang="text" class="" style="" inline="1">3</syntaxhighlight>), "zoomed out" is <syntaxhighlight lang="text" class="" style="" inline="1">1</syntaxhighlight>, and "zoomed midway" is the average
- Other optional parameters:
- {{#if:||mapframe-}}frame-width or {{#if:||mapframe-}}width – Frame width. Default: 270
- {{#if:||mapframe-}}frame-height or {{#if:||mapframe-}}height – Frame height. Default: 200
- {{#if:||mapframe-}}shape-fill – Color used to fill shape features. Default: #606060
- {{#if:||mapframe-}}shape-fill-opacity – Opacity level of shape fill, a number between 0 and 1. Default: 0.5
- {{#if:||mapframe-}}stroke-color or {{#if:||mapframe-}}stroke-colour – Color of line features, and outlines of shape features. Default: #ff0000
- {{#if:||mapframe-}}stroke-width – Width of line features, and outlines of shape features; default is "5". Default: 5
- {{#if:||mapframe-}}marker – Marker symbol to use for coordinates; see mw:Help:Extension:Kartographer/Icons for options. Default: not specified (i.e. blank)
- Can also be set to <syntaxhighlight lang="text" class="" style="" inline="1">blank</syntaxhighlight> to override any default marker symbol
- {{#if:||mapframe-}}marker-color or {{#if:||mapframe-}}marker-colour – Background color for the marker. Default: #5E74F3
- {{#if:||mapframe-}}geomask-stroke-color or {{#if:||mapframe-}}geomask-stroke-colour – Color of outline of geomask shape. Default: #555555
- {{#if:||mapframe-}}geomask-stroke-width – Width of outline of geomask shape. Default: 2
- {{#if:||mapframe-}}geomask-fill – Color used to fill outside geomask features. Default: #606060
- {{#if:||mapframe-}}geomask-fill-opacity – Opacity level of fill outside geomask features, a number between 0 and 1. Default: 0.5
- {{#if:||mapframe-}}zoom – Set the zoom level, from "1" (map of earth) to "18" (maximum zoom in), to be used if the zoom level cannot be determined automatically from object length or area. Default: 10
- {{#if:||mapframe-}}length_km or {{#if:||mapframe-}}length_mi or {{#if:||mapframe-}}area_km2 or {{#if:||mapframe-}}area_mi2 – Determine zoom level by passing in object's length (in kilometres or miles) or area (in square kilometres or square miles). Default: not specified
- {{#if:||mapframe-}}frame-coordinates or {{#if:||mapframe-}}frame-coord – Alternate latitude and longitude coordinates for initial placement of map, using {{coord}}. Default: derived from item coordinates
- {{#if:||mapframe-}}type – Set the type of the object, with the same usage as {{coord}}. Default: not specified
- {{#if:||mapframe-}}population – Set the population, useful with type="city", for {{Infobox dim}}. Default: not specified
{{#if:|
- Deprecated parameters
- Template:Gray – Alternate latitude coordinate for initial placement of map; default is derived from item coordinates
- Template:Gray – Alternate longitude coordinate for initial placement of map; default is derived from item coordinates
}}