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

From blackwiki
Jump to navigation Jump to search
imported>Grolltech
(Creating template)
 
imported>Grolltech
(Parameterize: width, height, columns, float)
Line 1: Line 1:
 
{{overlay
 
{{overlay
 
|image = USA Mass Cape Cod upper lower.svg
 
|image = USA Mass Cape Cod upper lower.svg
|width = 300
+
|width = {{#if:{{{width|}}}|{{{width}}}|300}}
|height = 225
+
|height = {{#if:{{{height|}}}|{{{height}}}|225}}
|columns = 3
+
|columns = {{#if:{{{columns|}}}|{{{columns}}}|3}}
|float = right
+
|float = {{#if:{{{float|}}}|{{{float}}}|right}}
 
|legendbox = yes
 
|legendbox = yes
 
|border = yes
 
|border = yes
Line 17: Line 17:
 
|legend3start = 8
 
|legend3start = 8
 
|legend3end = 10
 
|legend3end = 10
|legend4title = '''Outer Cape'''
+
|legend4title = '''Outer Cape''' <small>(occasionally, Lower Cape)</small>
 
|legend4start = 11
 
|legend4start = 11
 
|legend4end = 15
 
|legend4end = 15
Line 24: Line 24:
 
|overlay1 = Bourne
 
|overlay1 = Bourne
 
|overlay1link = Bourne, Massachusetts
 
|overlay1link = Bourne, Massachusetts
|overlay1top = 132
+
|overlay1top = {{#expr: (132 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay1left = 67
+
|overlay1left = {{#expr: (67 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay2 = Falmouth
 
|overlay2 = Falmouth
 
|overlay2link = Falmouth, Massachusetts
 
|overlay2link = Falmouth, Massachusetts
|overlay2top = 169
+
|overlay2top = {{#expr: (169 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay2left = 62
+
|overlay2left = {{#expr: (62 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay3 = Sandwich
 
|overlay3 = Sandwich
 
|overlay3link = Sandwich, Massachusetts
 
|overlay3link = Sandwich, Massachusetts
|overlay3top = 129
+
|overlay3top = {{#expr: (129 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay3left = 94
+
|overlay3left = {{#expr: (94 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay4 = Mashpee
 
|overlay4 = Mashpee
 
|overlay4link = Mashpee, Massachusetts
 
|overlay4link = Mashpee, Massachusetts
|overlay4top = 162
+
|overlay4top = {{#expr: (162 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay4left = 92
+
|overlay4left = {{#expr: (92 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay5color = blue
 
|overlay5color = blue
 
|overlay5 = Barnstable
 
|overlay5 = Barnstable
 
|overlay5link = Barnstable, Massachusetts
 
|overlay5link = Barnstable, Massachusetts
|overlay5top = 143
+
|overlay5top = {{#expr: (143 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay5left = 126
+
|overlay5left = {{#expr: (126 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay6 = Yarmouth
 
|overlay6 = Yarmouth
 
|overlay6link = Yarmouth, Massachusetts
 
|overlay6link = Yarmouth, Massachusetts
|overlay6top = 142
+
|overlay6top = {{#expr: (142 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay6left = 168
+
|overlay6left = {{#expr: (168 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay7 = Dennis
 
|overlay7 = Dennis
 
|overlay7link = Dennis, Massachusetts
 
|overlay7link = Dennis, Massachusetts
|overlay7top = 124
+
|overlay7top = {{#expr: (125 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay7left = 184
+
|overlay7left = {{#expr: (184 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay8color = red
 
|overlay8color = red
 
|overlay8 = Brewster
 
|overlay8 = Brewster
 
|overlay8link = Brewster, Massachusetts
 
|overlay8link = Brewster, Massachusetts
|overlay8top = 118
+
|overlay8top = {{#expr: (120 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay8left = 212
+
|overlay8left = {{#expr: (212 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay9 = Harwich
 
|overlay9 = Harwich
 
|overlay9link = Harwich, Massachusetts
 
|overlay9link = Harwich, Massachusetts
|overlay9top = 140
+
|overlay9top = {{#expr: (140 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay9left = 213
+
|overlay9left = {{#expr: (213 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay10 = Chatham
 
|overlay10 = Chatham
 
|overlay10link = Chatham, Massachusetts
 
|overlay10link = Chatham, Massachusetts
|overlay10top = 140
+
|overlay10top = {{#expr: (141 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay10left = 237
+
|overlay10left = {{#expr: (239 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay11color = saddlebrown
 
|overlay11color = saddlebrown
 
|overlay11 = Orleans
 
|overlay11 = Orleans
 
|overlay11link = Orleans, Massachusetts
 
|overlay11link = Orleans, Massachusetts
|overlay11top = 109
+
|overlay11top = {{#expr: (111 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay11left = 238
+
|overlay11left = {{#expr: (239 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay12 = Eastham
 
|overlay12 = Eastham
 
|overlay12link = Eastham, Massachusetts
 
|overlay12link = Eastham, Massachusetts
|overlay12top = 84
+
|overlay12top = {{#expr: (84 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay12left = 236
+
|overlay12left = {{#expr: (236 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay13 = Wellfleet
 
|overlay13 = Wellfleet
 
|overlay13link = Wellfleet, Massachusetts
 
|overlay13link = Wellfleet, Massachusetts
|overlay13top = 52
+
|overlay13top = {{#expr: (51 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay13left = 225
+
|overlay13left = {{#expr: (225 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay14 = Truro
 
|overlay14 = Truro
 
|overlay14link = Truro, Massachusetts
 
|overlay14link = Truro, Massachusetts
|overlay14top = 26
+
|overlay14top = {{#expr: (28 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay14left = 213
+
|overlay14left = {{#expr: (214 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
 
|overlay15 = Provincetown
 
|overlay15 = Provincetown
 
|overlay15link = Provincetown, Massachusetts
 
|overlay15link = Provincetown, Massachusetts
|overlay15top = 3
+
|overlay15top = {{#expr: (3 * ({{#if:{{{height|}}}|{{{height}}}|225}}/225)) round 0}}
|overlay15left = 171
+
|overlay15left = {{#expr: (171 * ({{#if:{{{width|}}}|{{{width}}}|300}}/300)) round 0}}
}}
+
}}<noinclude>
 +
 
 +
{{Documentation}}
 +
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS -->
 +
</noinclude>

Revision as of 17:52, 24 May 2013

Template:Overlay

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:

Template:Overlay

See also