Difference between revisions of "Template:Infobox mapframe/doc/parameters"

From blackwiki
Jump to navigation Jump to search
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 "mapframe_" prefix.
+
* 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'''
+
;'''mapframe-caption'''
 
:Caption for the map
 
:Caption for the map
:''Default'': ''blank'' (or if {{para|mapframe_geomask}} is set, "Location in {{kbd|geomask's label}}")
+
:''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|}}}||mapframe_}}id
+
;{{#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|}}}||mapframe_}}coord
+
;{{#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|}}}||mapframe_}}wikidata
+
;{{#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:'' {{{mapframe_wikidata|''not specified''}}}
+
:''Default:'' {{{mapframe-wikidata|''not specified''}}}
  
  
 
Customize which features are displayed:
 
Customize which features are displayed:
;{{#if:{{{noprefix|}}}||mapframe_}}shape
+
;{{#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:'' {{{mapframe_shape|''not specified''}}}
+
:''Default:'' {{{mapframe-shape|''not specified''}}}
;{{#if:{{{noprefix|}}}||mapframe_}}point
+
;{{#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:'' {{{mapframe_point|''not specified''}}}
+
:''Default:'' {{{mapframe-point|''not specified''}}}
;{{#if:{{{noprefix|}}}||mapframe_}}line
+
;{{#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:'' {{{mapframe_line|''not specified''}}}
+
:''Default:'' {{{mapframe-line|''not specified''}}}
  
  
 
Other optional parameters:
 
Other optional parameters:
;{{#if:{{{noprefix|}}}||mapframe_}}frame-width
+
;{{#if:{{{noprefix|}}}||mapframe-}}frame-width
 
:Frame width
 
:Frame width
:''Default:'' {{{mapframe_frame-width|270}}}
+
:''Default:'' {{{mapframe-frame-width|270}}}
;{{#if:{{{noprefix|}}}||mapframe_}}frame-height
+
;{{#if:{{{noprefix|}}}||mapframe-}}frame-height
 
:Frame height
 
:Frame height
:''Default:'' {{{mapframe_frame-height|200}}}
+
:''Default:'' {{{mapframe-frame-height|200}}}
;{{#if:{{{noprefix|}}}||mapframe_}}shape-fill
+
;{{#if:{{{noprefix|}}}||mapframe-}}shape-fill
 
:Color used to fill shape features
 
:Color used to fill shape features
:''Default:'' {{{mapframe_shape-fill|#606060}}}
+
:''Default:'' {{{mapframe-shape-fill|#606060}}}
;{{#if:{{{noprefix|}}}||mapframe_}}shape-fill-opacity
+
;{{#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:'' {{{mapframe_shape-fill-opacity|0.5}}}
+
:''Default:'' {{{mapframe-shape-fill-opacity|0.5}}}
;{{#if:{{{noprefix|}}}||mapframe_}}stroke-color
+
;{{#if:{{{noprefix|}}}||mapframe-}}stroke-color
:''or '''{{#if:{{{noprefix|}}}||mapframe_}}stroke-colour'''''
+
:''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:'' {{{mapframe_stroke-color|{{{mapframe_stroke-colour|#ff0000}}}}}}
+
:''Default:'' {{{mapframe-stroke-color|{{{mapframe-stroke-colour|#ff0000}}}}}}
;{{#if:{{{noprefix|}}}||mapframe_}}stroke-width
+
;{{#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:'' {{{mapframe_stroke-width|5}}}
+
:''Default:'' {{{mapframe-stroke-width|5}}}
;{{#if:{{{noprefix|}}}||mapframe_}}marker
+
;{{#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:'' {{{mapframe_marker|''not specified''}}}
+
:''Default:'' {{{mapframe-marker|''not specified''}}}
;{{#if:{{{noprefix|}}}||mapframe_}}marker-color
+
;{{#if:{{{noprefix|}}}||mapframe-}}marker-color
:'' or '''{{#if:{{{noprefix|}}}||mapframe_}}marker-colour'''''
+
:'' or '''{{#if:{{{noprefix|}}}||mapframe-}}marker-colour'''''
 
:Background color for the marke
 
:Background color for the marke
:''Default:'' {{{mapframe_marker-color|{{{mapframe_marker-colour|#5E74F3}}}}}}
+
:''Default:'' {{{mapframe-marker-color|{{{mapframe-marker-colour|#5E74F3}}}}}}
;{{#if:{{{noprefix|}}}||mapframe_}}geomask
+
;{{#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:'' {{{mapframe_marker|''not specified''}}}
+
:''Default:'' {{{mapframe-marker|''not specified''}}}
;{{#if:{{{noprefix|}}}||mapframe_}}geomask-stroke-color
+
;{{#if:{{{noprefix|}}}||mapframe-}}geomask-stroke-color
:''or '''{{#if:{{{noprefix|}}}||mapframe_}}geomask-stroke-colour'''''
+
:''or '''{{#if:{{{noprefix|}}}||mapframe-}}geomask-stroke-colour'''''
 
:Color of outline of geomask shape
 
:Color of outline of geomask shape
:''Default:'' {{{mapframe_geomask-stroke-color|{{{mapframe_geomask-stroke-colour|#555555}}}}}}
+
:''Default:'' {{{mapframe-geomask-stroke-color|{{{mapframe-geomask-stroke-colour|#555555}}}}}}
;{{#if:{{{noprefix|}}}||mapframe_}}geomask-stroke-width
+
;{{#if:{{{noprefix|}}}||mapframe-}}geomask-stroke-width
 
:Width of outline of geomask shape
 
:Width of outline of geomask shape
:''Default:'' {{{mapframe_geomask-stroke-width|2}}}
+
:''Default:'' {{{mapframe-geomask-stroke-width|2}}}
;{{#if:{{{noprefix|}}}||mapframe_}}geomask-fill
+
;{{#if:{{{noprefix|}}}||mapframe-}}geomask-fill
 
:Color used to fill outside geomask features
 
:Color used to fill outside geomask features
:''Default:'' {{{mapframe_geomask-fill|#606060}}}
+
:''Default:'' {{{mapframe-geomask-fill|#606060}}}
;{{#if:{{{noprefix|}}}||mapframe_}}geomask-fill-opacity
+
;{{#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:'' {{{mapframe_geomask-fill-opacity|0.5}}}
+
:''Default:'' {{{mapframe-geomask-fill-opacity|0.5}}}
;{{#if:{{{noprefix|}}}||mapframe_}}zoom
+
;{{#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:'' {{{mapframe_zoom|10}}}
+
:''Default:'' {{{mapframe-zoom|10}}}
;{{#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
+
;{{#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|}}}||mapframe_}}frame-coordinates
+
;{{#if:{{{noprefix|}}}||mapframe-}}frame-coordinates
:''or'' '''{{#if:{{{noprefix|}}}||mapframe_}}frame-coord'''
+
:''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|}}}||mapframe_}}frame-lat (''deprecated'')
+
;{{#if:{{{noprefix|}}}||mapframe-}}frame-lat (''deprecated'')
:''or'' '''{{#if:{{{noprefix|}}}||mapframe_}}frame-latitude'''
+
:''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|}}}||mapframe_}}frame-long (''deprecated'')
+
;{{#if:{{{noprefix|}}}||mapframe-}}frame-long (''deprecated'')
:''or'' '''{{#if:{{{noprefix|}}}||mapframe_}}frame-longitude'''
+
:''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

Template documentation

Parameter documentation for {{Infobox mapframe}} and Module:Infobox mapframe (auto function).

  • Set |noprefix=yes to 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=yes to show deprecated parameters

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 yes to 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 to inverse
Default: not specified
mapframe-point
Turn off display of point feature by setting to none. Force point marker to be displayed by setting to on.
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. P17 for Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P17), P131 for 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