Difference between revisions of "Template:Infobox dim/doc"
Jump to navigation
Jump to search
imported>Hike395 (update doc to incoporate use of area parameters) |
imported>Hike395 (update doc) |
||
| Line 10: | Line 10: | ||
* area_mi2 | * area_mi2 | ||
* area_km2 | * area_km2 | ||
| + | * area_acre | ||
| + | * area_ha | ||
== Source == | == Source == | ||
<pre> | <pre> | ||
| − | {{Infobox dim/core | + | {{Infobox dim/core|{{#if:{{{length_mi|}}}|{{#expr:{{{length_mi}}}*1.609}}|{{{length_km|}}} }} |
| − | + | |{{#if:{{{width_mi|}}}|{{#expr:{{{width_mi}}}*1.609}}|{{{width_km|}}} }} | |
| − | + | |{{#switch: 1 | |
| − | + | | {{#if:{{{area_mi2|}}}|1|0}} = {{#expr:{{{area_mi2}}}*2.59}} | |
| − | + | | {{#if:{{{area_acre|}}}|1|0}} = {{#expr:{{{area_acre}}}*0.004047}} | |
| − | + | | {{#if:{{{area_ha|}}}|1|0}} = {{#expr:{{{area_ha}}}*0.01}} | |
| − | + | | {{#if:{{{area_km2|}}}|1|0}} = {{{area_km2}}} }} }}</pre> | |
| − | |||
| − | |||
| − | |||
== See also == | == See also == | ||
*{{tl|Infobox mountain range}} | *{{tl|Infobox mountain range}} | ||
| + | *{{tl|Infobox ecoregion}} | ||
| + | *{{tl|Infobox protected area}} | ||
<includeonly> | <includeonly> | ||
<!-- Categories and interwikis go here: --> | <!-- Categories and interwikis go here: --> | ||
</includeonly> | </includeonly> | ||
Revision as of 17:41, 23 December 2016
| File:Edit-copy green.svg | This is a documentation subpage for Template:Infobox dim. It contains usage information, categories and other content that is not part of the original template page. |
Usage
{{Infobox dim}} is used inside infoboxes to determine the size of an object. This is passed to geohack to make appropriate map sizes. Parameters are all optional:
- length_mi
- length_km
- width_mi
- width_km
- area_mi2
- area_km2
- area_acre
- area_ha
Source
{{Infobox dim/core|{{#if:{{{length_mi|}}}|{{#expr:{{{length_mi}}}*1.609}}|{{{length_km|}}} }}
|{{#if:{{{width_mi|}}}|{{#expr:{{{width_mi}}}*1.609}}|{{{width_km|}}} }}
|{{#switch: 1
| {{#if:{{{area_mi2|}}}|1|0}} = {{#expr:{{{area_mi2}}}*2.59}}
| {{#if:{{{area_acre|}}}|1|0}} = {{#expr:{{{area_acre}}}*0.004047}}
| {{#if:{{{area_ha|}}}|1|0}} = {{#expr:{{{area_ha}}}*0.01}}
| {{#if:{{{area_km2|}}}|1|0}} = {{{area_km2}}} }} }}