Content deleted Content added
→Usage: automatic maps in infoboxes |
documenting parameters |
||
Line 18:
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_caption | mapframe_id | mapframe_coord | mapframe_wikidata | mapframe_shape | mapframe_frame-width | mapframe_frame-height | mapframe_shape-fill | mapframe_shape-fill-opacity | mapframe_stroke-color | mapframe_stroke-colour | mapframe_stroke-width | mapframe_marker | mapframe_marker-color | mapframe_marker-colour | mapframe_geomask | mapframe_geomask-stroke-color | mapframe_geomask-stroke-colour | mapframe_geomask-stroke-width | mapframe_geomask-fill | mapframe_geomask-fill-opacity | mapframe_zoom | mapframe_length_km
</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><nowiki>{{#invoke:Infobox mapframe/sandbox|auto|marker=library}}</nowiki></code> 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>}}
* Add the new parameters to the document. You can use {{tl|Infobox mapframe/doc/parameters}}. Specify default values in the {{kbd|#invoke}} calls using by adding parameters in the form {{!}}''parameter-name''{{=}}''value''. The default output is shown here collpased: {{cot}}{{Infobox mapframe/doc/parameters}}{{cob}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
|