Difference between revisions of "Template:Cape Cod overlay map"

From blackwiki
Jump to navigation Jump to search
imported>Grolltech
(eliminate height param; instead, calculate it as 75% of width)
imported>Grolltech
(place inside a div to float correctly in articles)
Line 1: Line 1:
 +
<div class="{{#switch:{{{float|}}}
 +
| left
 +
| Left = tleft
 +
| center
 +
| Center = tnone
 +
| #default = tright
 +
}}">
 
{{overlay
 
{{overlay
 
|image = USA Mass Cape Cod upper lower.svg
 
|image = USA Mass Cape Cod upper lower.svg
Line 85: Line 92:
 
|overlay15top = {{#expr: (3 * ({{#if:{{{width|}}}|{{#expr: ({{{width}}} * 0.75) round 0}}|225}}/225)) round 0}}
 
|overlay15top = {{#expr: (3 * ({{#if:{{{width|}}}|{{#expr: ({{{width}}} * 0.75) round 0}}|225}}/225)) round 0}}
 
|overlay15left = {{#expr: (171 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay15left = {{#expr: (171 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
}}<noinclude>
+
}}</div><noinclude>
  
 
{{Documentation}}
 
{{Documentation}}
 
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS -->
 
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS -->
 
</noinclude>
 
</noinclude>

Revision as of 12:13, 7 June 2013

50px Template documentation[view] [edit] [history] [purge]

Usage

{{Cape Cod overlay map | width = Template:Varserif | columns = Template:Varserif | float = Template:Varserif }}

where:

|width= desired width of the map image; default is 300px. This also forms the basis of the height of the map image, which will be calculated as 75% of the width.
|columns= number of columns to display in the legend; default is 3.
|float= designates to which side of the article text the map should appear. Valid values are: left, right (default), and center.

Example

The map at the top of the page was made using all default values – that is, by using the following wikicode:

{{Cape Cod overlay map}}

Compare the map at the top of the page with the following example:

{{Cape Cod overlay map
 |width = 200
 |columns = 2
 |float = center 
}}
which produces:

See also