Template:Location map data documentation/doc: Difference between revisions

Content deleted Content added
Usage: created "parameters" section using section moved from Template:Location map/Creating a new map definition#Documentation
+ other params, |name actually uses wikilinks, and use {{Format TemplateData}}
 
Line 4:
== Usage ==
This page is a [[Help:Template|template]] which generates documentation for ___location map data [[Help:Module|modules]] having names starting with "Module:Location map/data/", such as [[Module:Location map/data/Morocco]]. It is used each module's documentation page, such as [[Module:Location map/data/Morocco/doc]].
 
=== Parameters ===
<!-- NOTE: This section is transcluded in [[Template:Location map/Creating a new map definition]]. -->
The following parameters are taken by [[Template:Location map data documentation]]:
{| class="wikitable" style="width: 50%;"
! Parameter
! Description
|-
| <code>image</code>
| An additional image to display (other than the one the ___location map uses) on the right side of the documentation page. If not specified, no additional image is displayed.
|-
| <code>projection</code>
| The type of projection the ___location map uses. If not specified, "<nowiki>an [[equirectangular projection]]</nowiki>" is used.
|-
| <code>name</code>
| The name to display in the map's documentation. The name is unlinked by default. If not specified, the actual name of the ___location map is used.
|-
| <code>examples</code>
| A section containing examples of the ___location map's usage. A {{tl|clear}} template is automatically placed at the end of the examples. If not specified, no examples are output.
|-
| <code>see also</code>
| Additional links to place in the "See also" section.
|}
All information about the map will be automatically taken from the map's definition itself.
 
=== List of submaps ===
:[[Special:PrefixIndex/Module:Location map/data/]]
 
== TemplateData ==
{{Format TemplateData<includeonly>|lazy=1</includeonly>|<templatedata>
{
"params": {
"image": {
| "description": "An additional image to display (other than the one the ___location map uses) on the right side of the documentation page. If not specified, no additional image is displayed.",
"type": "content",
"example": "[[File:Example.jpg]]"
},
"projection": {
"description": "The type of projection the ___location map uses.",
"type": "string",
"default": "an [[equirectangular projection]]"
},
"name": {
| "description": "The name to display in the map's documentation. The name is unlinkedlinked by default. If not specified, the actual name of the ___location map is used.",
"default": "[[{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|name}}]]",
"type": "content"
},
"precision": {
"description": "Replaces the default Precision section",
"type": "content"
},
"examples": {
| "description": "A section containing examples of the ___location map's usage. A {{tl|clear}} template is automatically placed at the end of the examples. If not specified, no examples are output.",
"example": "=== Location map, using default map (image) === {{Location map|France|width=200|lat_deg=48.857|lon_deg=2.351|label=Paris}} <pre style=\"width:30em\"> {{Location map|France|width=200|lat_deg=48.857|lon_deg=2.351|label=Paris}} </pre> {{clear}}",
"type": "content"
},
"see also": {
"description": "Fills the See also section. Empty section if not specified",
"type": "content"
}
},
"description": "Generates documentation for ___location map data modules having names starting with \"Module:Location map/data/\""
|}
</templatedata>}}
All information about the map will be automatically taken from the map's definition itself.
 
== See also ==