Module:Infobox mapframe/doc: Difference between revisions

Content deleted Content added
{{cot}} should start on new line to avoid breaking the green documentation box
ce
 
(13 intermediate revisions by 8 users not shown)
Line 1:
{{Module rating|beta}}
{{Lua sidebar}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{High-use}}
{{Lua|Module:Mapframe|Module:InfoboxImage|Module:Infobox dim|Module:Yesno|Module:Arguments}}
{{Lua sidebar}}
 
== Usage ==
 
Line 29 ⟶ 32:
If the template has a <code><nowiki>{{#invoke:</nowiki>[[Module:Check for unknown parameters|Check for unknown parameters]]<nowiki>}}</nowiki></code>, add the following parameters:
<pre>
| mapframe | mapframe-captionarea_km2 | mapframe-customarea_mi2 | mapframe-idcaption | mapframe-coord | mapframe-wikidatacoordinates | mapframe-pointcustom | mapframe-shapeframe-coord | mapframe-frame-widthcoordinates | mapframe-frame-height | mapframe-shapeframe-width | mapframe-geomask | mapframe-geomask-fill | mapframe-shapegeomask-fill-opacity | mapframe-geomask-stroke-color | mapframe-geomask-stroke-colour | mapframe-geomask-stroke-width | mapframe-markerheight | mapframe-markerid | mapframe-colorlength_km | mapframe-marker-colourlength_mi | mapframe-geomaskmarker | mapframe-geomask-strokemarker-color | mapframe-geomask-strokemarker-colour | mapframe-geomaskpoint | mapframe-strokepopulation | mapframe-widthshape | mapframe-geomaskshape-fill | mapframe-geomaskshape-fill-opacity | mapframe-zoomstroke-color | mapframe-length_kmstroke-colour | mapframe-length_mistroke-width | mapframe-area_km2switcher | mapframe-area_mi2type | mapframe-frame-coordinateswidth | mapframe-frame-coordwikidata | mapframe-switcherzoom
</pre>
Once this is done, the above parameters will be available to users of the template.
* Defaults values for these parameters can also be specified in the {{kbd|#invoke}} calls above, e.g.
<code><nowikipre>{{#invoke:Infobox mapframe/sandbox
| auto
| mapframe-marker = library
}}</nowiki></codepre>
: means that the library marker will be used, unless a different value is passed in to the template.
* The maps are off by default, which means maps will not be displayed unless {{para|mapframe|yes}} is present in the template call.
*: To turn maps on by default, in the {{kbd|#invoke}} calls above add {{para|onByDefault|yes}} – which means maps will be displayed unless {{para|mapframe|no}} is present in the template call.
*: {{kbd|onByDefault}} can also be set to a conditional, such as if another parameters is present, e.g. {{para|onByDefault|2=<nowiki>{{#if:{{{pushpin_map|}}}|no|yes}}</nowiki>}}
*: Both the {{kbd|auto}} and {{kbd|autocaption}} functions take the {{kbd|onByDefault}} value into account.
* Add the new parameters to the document.
*: You can use {{tlx|Infobox mapframe/doc/parameters}}.
*: SpecifyIf any default values (if any are usedmodified in the {{kbd|#invoke}} calls), usingadd bythem addingas parameters in the form {{tt|{{!}}}}''parameter-name''{{tt|{{=}}}}''value''.
*: The default output is shown here collapsed:
{{cot}}
{{Infobox mapframe/doc/parameters}}
{{cob}}
*Parameters can also be added to the TemplateData, which can be copied and pasted from the relevant parts of {{edit|Template:Infobox mapframe/doc|Template:Infobox mapframe/doc}}
 
== See also ==
* [[Wikipedia:Mapframe maps in infoboxes]]
* [[Module:Mapframe]] & [[Template:Maplink]]
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
 
}}</includeonly><noinclude>
[[Category:Module documentation pages]]
</noinclude>