Difference between revisions of "Template:Infobox mapframe/doc/parameters"
Jump to navigation
Jump to search
Template documentation
imported>Evad37 (#) |
imported>Evad37 (mapframe_ → mapframe-; add mapframe-custom) |
||
| Line 1: | Line 1: | ||
<noinclude>{{Documentation|content=Parameter documentation for {{tl|Infobox mapframe}} and [[Module:Infobox mapframe]] (<code>auto</code> function). | <noinclude>{{Documentation|content=Parameter documentation for {{tl|Infobox mapframe}} and [[Module:Infobox mapframe]] (<code>auto</code> function). | ||
| − | * Set {{para|noprefix|yes}} to show without the " | + | * Set {{para|noprefix|yes}} to show without the "mapframe-" prefix. |
* Set alternate default values by passing in parameters of the form ''parameter-name''=''value'' e.g. {{para|mapframe-marker|church}}. | * Set alternate default values by passing in parameters of the form ''parameter-name''=''value'' e.g. {{para|mapframe-marker|church}}. | ||
* Set {{para|deprecated|yes}} to show deprecated parameters | * Set {{para|deprecated|yes}} to show deprecated parameters | ||
| Line 8: | Line 8: | ||
:Specify yes or no to show or hide the map, overriding the default | :Specify yes or no to show or hide the map, overriding the default | ||
:''Default:'' {{{mapframe|no}}} | :''Default:'' {{{mapframe|no}}} | ||
| − | ;''' | + | ;'''mapframe-caption''' |
:Caption for the map | :Caption for the map | ||
| − | :''Default'': ''blank'' (or if {{para| | + | :''Default'': ''blank'' (or if {{para|mapframe-geomask}} is set, "Location in {{kbd|geomask's label}}") |
| + | ;'''mapframe-custom''' | ||
| + | :Use a custom map instead of the automatic mapframe. Specify either a {{tlx|maplink}} 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:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}id |
:Id (Q-number) of Wikidata item to use, instead of the current page's item | :Id (Q-number) of Wikidata item to use, instead of the current page's item | ||
:''Default:'' ''item for current page'' | :''Default:'' ''item for current page'' | ||
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}coord |
:Coordinates to use instead, of any on Wikidata. Use the {{tl|Coord}} template, e.g. {{para|coord|2={{tlx|Coord|12.34|N|56.78|E}}}} | :Coordinates to use instead, of any on Wikidata. Use the {{tl|Coord}} template, e.g. {{para|coord|2={{tlx|Coord|12.34|N|56.78|E}}}} | ||
:''Default:'' ''coordinates from Wikidata'' | :''Default:'' ''coordinates from Wikidata'' | ||
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}wikidata |
:Set to {{code|yes}} to show shape/line features from the wikidata item, if any, when {{para|coord}} is set. | :Set to {{code|yes}} to show shape/line features from the wikidata item, if any, when {{para|coord}} is set. | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-wikidata|''not specified''}}} |
Customize which features are displayed: | Customize which features are displayed: | ||
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}shape |
:Turn off display of shape feature by setting to {{code|none}}. Use an inverse shape (geomask) instead of a regular shape by setting to {{code|inverse}} | :Turn off display of shape feature by setting to {{code|none}}. Use an inverse shape (geomask) instead of a regular shape by setting to {{code|inverse}} | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-shape|''not specified''}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}point |
:Turn off display of point feature by setting to {{code|none}}. Force point marker to be displayed by setting to {{code|on}}. | :Turn off display of point feature by setting to {{code|none}}. Force point marker to be displayed by setting to {{code|on}}. | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-point|''not specified''}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}line |
:Turn off display of line feature by setting to {{code|none}} | :Turn off display of line feature by setting to {{code|none}} | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-line|''not specified''}}} |
Other optional parameters: | Other optional parameters: | ||
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}frame-width |
:Frame width | :Frame width | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-frame-width|270}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}frame-height |
:Frame height | :Frame height | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-frame-height|200}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}shape-fill |
:Color used to fill shape features | :Color used to fill shape features | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-shape-fill|#606060}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}shape-fill-opacity |
:Opacity level of shape fill, a number between 0 and 1 | :Opacity level of shape fill, a number between 0 and 1 | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-shape-fill-opacity|0.5}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}stroke-color |
| − | :''or '''{{#if:{{{noprefix|}}}|| | + | :''or '''{{#if:{{{noprefix|}}}||mapframe-}}stroke-colour''''' |
:Color of line features, and outlines of shape features | :Color of line features, and outlines of shape features | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-stroke-color|{{{mapframe-stroke-colour|#ff0000}}}}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}stroke-width |
:Width of line features, and outlines of shape features; default is "5" | :Width of line features, and outlines of shape features; default is "5" | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-stroke-width|5}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}marker |
:Marker symbol to use for coordinates; see [[mw:Help:Extension:Kartographer/Icons]] for options | :Marker symbol to use for coordinates; see [[mw:Help:Extension:Kartographer/Icons]] for options | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-marker|''not specified''}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}marker-color |
| − | :'' or '''{{#if:{{{noprefix|}}}|| | + | :'' or '''{{#if:{{{noprefix|}}}||mapframe-}}marker-colour''''' |
:Background color for the marke | :Background color for the marke | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-marker-color|{{{mapframe-marker-colour|#5E74F3}}}}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||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. <code>P17</code> for {{Q|P17}}, <code>P131</code> for {{Q|P131}}) | :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. <code>P17</code> for {{Q|P17}}, <code>P131</code> for {{Q|P131}}) | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-marker|''not specified''}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}geomask-stroke-color |
| − | :''or '''{{#if:{{{noprefix|}}}|| | + | :''or '''{{#if:{{{noprefix|}}}||mapframe-}}geomask-stroke-colour''''' |
:Color of outline of geomask shape | :Color of outline of geomask shape | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-geomask-stroke-color|{{{mapframe-geomask-stroke-colour|#555555}}}}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}geomask-stroke-width |
:Width of outline of geomask shape | :Width of outline of geomask shape | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-geomask-stroke-width|2}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}geomask-fill |
:Color used to fill outside geomask features | :Color used to fill outside geomask features | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-geomask-fill|#606060}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}geomask-fill-opacity |
:Opacity level of fill outside geomask features, a number between 0 and 1 | :Opacity level of fill outside geomask features, a number between 0 and 1 | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-geomask-fill-opacity|0.5}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}zoom |
:Set the zoom level, from "1" to "18", to used if the zoom level cannot be determined automatically from object length or area. | :Set the zoom level, from "1" to "18", to used if the zoom level cannot be determined automatically from object length or area. | ||
| − | :''Default:'' {{{ | + | :''Default:'' {{{mapframe-zoom|10}}} |
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}length_km {{nobold|or}} {{#if:{{{noprefix|}}}||mapframe-}}length_mi {{nobold|or}} {{#if:{{{noprefix|}}}||mapframe-}}area_km2 {{nobold|or}} {{#if:{{{noprefix|}}}||mapframe-}}area_mi2 |
:Determine zoom level by passing in object's length (in kilometres or miles) or area (in square kilometres or square miles) | :Determine zoom level by passing in object's length (in kilometres or miles) or area (in square kilometres or square miles) | ||
:''Default:'' ''not specified'' | :''Default:'' ''not specified'' | ||
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}frame-coordinates |
| − | :''or'' '''{{#if:{{{noprefix|}}}|| | + | :''or'' '''{{#if:{{{noprefix|}}}||mapframe-}}frame-coord''' |
:Alternate latitude and longitude coordinates for initial placement of map, using {{tl|coord}} | :Alternate latitude and longitude coordinates for initial placement of map, using {{tl|coord}} | ||
:''Default:'' ''derived from item coordinates'' | :''Default:'' ''derived from item coordinates'' | ||
| Line 92: | Line 95: | ||
''Deprecated parameters'' | ''Deprecated parameters'' | ||
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}frame-lat (''deprecated'') |
| − | :''or'' '''{{#if:{{{noprefix|}}}|| | + | :''or'' '''{{#if:{{{noprefix|}}}||mapframe-}}frame-latitude''' |
:Alternate latitude coordinate for initial placement of map; default is derived from item coordinates | :Alternate latitude coordinate for initial placement of map; default is derived from item coordinates | ||
| − | ;{{#if:{{{noprefix|}}}|| | + | ;{{#if:{{{noprefix|}}}||mapframe-}}frame-long (''deprecated'') |
| − | :''or'' '''{{#if:{{{noprefix|}}}|| | + | :''or'' '''{{#if:{{{noprefix|}}}||mapframe-}}frame-longitude''' |
:Alternate longitude coordinate for initial placement of map; default is derived from item coordinates | :Alternate longitude coordinate for initial placement of map; default is derived from item coordinates | ||
}} | }} | ||
Revision as of 03:36, 17 June 2020
Parameter documentation for {{Infobox mapframe}} and Module:Infobox mapframe (auto function).
- Set
|noprefix=yesto show without the "mapframe-" prefix. - Set alternate default values by passing in parameters of the form parameter-name=value e.g.
|mapframe-marker=church. - Set
|deprecated=yesto show deprecated parameters
| The above documentation is transcluded from Template:Infobox mapframe/doc/parameters/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |
Basic parameters:
- 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
|mapframe-geomask=is set, "Location in geomask's label") - mapframe-custom
- Use a custom map instead of the automatic mapframe. Specify either a
{{maplink}}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
- mapframe-id
- Id (Q-number) of Wikidata item to use, instead of the current page's item
- Default: item for current page
- mapframe-coord
- Coordinates to use instead, of any on Wikidata. Use the {{Coord}} template, e.g.
|coord={{Coord|12.34|N|56.78|E}} - Default: coordinates from Wikidata
- mapframe-wikidata
- Set to
yesto show shape/line features from the wikidata item, if any, when|coord=is set. - Default: not specified
Customize which features are displayed:
- mapframe-shape
- Turn off display of shape feature by setting to
none. Use an inverse shape (geomask) instead of a regular shape by setting toinverse - Default: not specified
- mapframe-point
- Turn off display of point feature by setting to
none. Force point marker to be displayed by setting toon. - Default: not specified
- mapframe-line
- Turn off display of line feature by setting to
none - Default: not specified
Other optional parameters:
- mapframe-frame-width
- Frame width
- Default: 270
- mapframe-frame-height
- Frame height
- Default: 200
- mapframe-shape-fill
- Color used to fill shape features
- Default: #606060
- mapframe-shape-fill-opacity
- Opacity level of shape fill, a number between 0 and 1
- Default: 0.5
- mapframe-stroke-color
- or mapframe-stroke-colour
- Color of line features, and outlines of shape features
- Default: #ff0000
- mapframe-stroke-width
- Width of line features, and outlines of shape features; default is "5"
- Default: 5
- mapframe-marker
- Marker symbol to use for coordinates; see mw:Help:Extension:Kartographer/Icons for options
- Default: not specified
- mapframe-marker-color
- or mapframe-marker-colour
- Background color for the marke
- Default: #5E74F3
- 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 Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P17),P131for Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P131)) - Default: not specified
- mapframe-geomask-stroke-color
- or mapframe-geomask-stroke-colour
- Color of outline of geomask shape
- Default: #555555
- mapframe-geomask-stroke-width
- Width of outline of geomask shape
- Default: 2
- mapframe-geomask-fill
- Color used to fill outside geomask features
- Default: #606060
- mapframe-geomask-fill-opacity
- Opacity level of fill outside geomask features, a number between 0 and 1
- Default: 0.5
- mapframe-zoom
- Set the zoom level, from "1" to "18", to used if the zoom level cannot be determined automatically from object length or area.
- Default: 10
- mapframe-length_km or mapframe-length_mi or mapframe-area_km2 or 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
- mapframe-frame-coordinates
- or mapframe-frame-coord
- Alternate latitude and longitude coordinates for initial placement of map, using {{coord}}
- Default: derived from item coordinates