Difference between revisions of "Template:GraticuleQ"

From Geohashing
imported>Mattyk
m (Replacing http://wiki.xkcd.com/wgh/index.php?title=Template:GraticuleQ/Documentation&action=edit with {{canonicalurl:Template:GraticuleQ/Documentation|action=edit}})
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
 
{{#if:{{{maponly|}}}||<!-- Put any extra headings below here. -->
 
{{#if:{{{maponly|}}}||<!-- Put any extra headings below here. -->
 
<tr>
 
<tr>
     <td style="text-align:left;width:7em" width="7em">'''{{{nw|-}}}'''</td>
+
     <td style="text-align:left;width:7em">'''{{{nw|-}}}'''</td>
     <td style="text-align:center;width:8em" width="8em">'''{{{nnw|{{{n|-}}}}}}'''</td>
+
     <td style="text-align:center;width:8em">'''{{{nnw|{{{n|-}}}}}}'''</td>
     <td style="text-align:center;width:8em" width="8em">'''{{{nne|{{{n|-}}}}}}'''</td>
+
     <td style="text-align:center;width:8em">'''{{{nne|{{{n|-}}}}}}'''</td>
     <td style="text-align:right;width:7em" width="7em">'''{{{ne|-}}}'''</td>
+
     <td style="text-align:right;width:7em" >'''{{{ne|-}}}'''</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
     <td style="text-align:left;width:7em" width="7em">'''{{{wnw|{{{w|-}}}}}}'''</td>
+
     <td style="text-align:left;width:7em">'''{{{wnw|{{{w|-}}}}}}'''</td>
     {{#if:{{{name-full|}}}|<td style="text-align:center;width:8em;background-color:#f3f3f3;" width="8em" colspan="2" rowspan="2">'''{{{name-full}}}'''</td>|<td style="text-align:center;width:8em" width="8em">'''{{{namenw|{{{name|{{PAGENAME}}}}} NW}}}'''</td>
+
     {{#if:{{{name-full|}}}|<td style="text-align:center;width:16em;background-color:#f3f3f3;" colspan="2" rowspan="2">'''{{{name-full}}}'''</td>|<td style="text-align:center;width:8em">'''{{{namenw|{{{name|{{PAGENAME}}}}} NW}}}'''</td>
     <td style="text-align:center;width:8em" width="8em">'''{{{namene|{{{name|{{PAGENAME}}}}} NE}}}'''</td>}}
+
     <td style="text-align:center;width:8em">'''{{{namene|{{{name|{{PAGENAME}}}}} NE}}}'''</td>}}
     <td style="text-align:right;width:7em" width="7em">'''{{{ene|{{{e|-}}}}}}'''</td>
+
     <td style="text-align:right;width:7em">'''{{{ene|{{{e|-}}}}}}'''</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
     <td style="text-align:left;width:7em" width="7em">'''{{{wsw|{{{w|-}}}}}}'''</td>{{#if:{{{name-full|}}}||
+
     <td style="text-align:left;width:7em">'''{{{wsw|{{{w|-}}}}}}'''</td>{{#if:{{{name-full|}}}||
     <td style="text-align:center;width:8em" width="8em">'''{{{namesw|{{{name|{{PAGENAME}}}}} SW}}}'''</td>
+
     <td style="text-align:center;width:8em">'''{{{namesw|{{{name|{{PAGENAME}}}}} SW}}}'''</td>
     <td style="text-align:center;width:8em" width="8em">'''{{{namese|{{{name|{{PAGENAME}}}}} SE}}}'''</td>}}
+
     <td style="text-align:center;width:8em">'''{{{namese|{{{name|{{PAGENAME}}}}} SE}}}'''</td>}}
     <td style="text-align:right;width:7em" width="7em">'''{{{ese|{{{e|-}}}}}}'''</td>
+
     <td style="text-align:right;width:7em">'''{{{ese|{{{e|-}}}}}}'''</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
     <td style="text-align:left;width:7em" width="7em">'''{{{sw|-}}}'''</td>
+
     <td style="text-align:left;width:7em">'''{{{sw|-}}}'''</td>
     <td style="text-align:center;width:8em" width="8em">'''{{{ssw|{{{s|-}}}}}}'''</td>
+
     <td style="text-align:center;width:8em">'''{{{ssw|{{{s|-}}}}}}'''</td>
     <td style="text-align:center;width:8em" width="8em">'''{{{sse|{{{s|-}}}}}}'''</td>
+
     <td style="text-align:center;width:8em">'''{{{sse|{{{s|-}}}}}}'''</td>
     <td style="text-align:right;width:7em" width="7em">'''{{{se|-}}}'''</td>
+
     <td style="text-align:right;width:7em">'''{{{se|-}}}'''</td>
 
</tr>
 
</tr>
 
<!-- Put any additional fields above here.
 
<!-- Put any additional fields above here.
Line 40: Line 40:
 
{{Template:GraticuleQ/Documentation}}
 
{{Template:GraticuleQ/Documentation}}
  
&rarr; [http://wiki.xkcd.com/wgh/index.php?title=Template:GraticuleQ/Documentation&action=edit Edit Documentation]
+
&rarr; [{{canonicalurl:Template:GraticuleQ/Documentation|action=edit}} Edit Documentation]
 
</noinclude>
 
</noinclude>

Latest revision as of 13:19, 19 February 2020

nw nnw nne ne
wnw namenw namene ene
wswnamesw namese ese
sw ssw sse se
mapnw mapne
mapsw mapse
Full Example
nw n n ne
w name NW name NE e
wname SW name SE e
sw s s se
map
Minimal Example
Brainerd - Duluth Hayward, WI
St. Cloud Minneapolis NW St. Paul NE Rice Lake, WI
HutchinsonMinneapolis SW St. Paul SE Eau Claire, WI
Estherville, IA Albert Lea Austin La Crosse, WI
MSP Graticules.png
Real Example

A more awesome version of Template:Graticule, designed for cities that occupy four adjacent graticules.

Based on a concept by Joannac, overcomplicated by Matty.

Parameters

(refer to the Full Example at right to see where each parameter goes)

mapnw, mapne, mapse, mapsw
What to draw for the appropriate map.
map
What to draw for the entire map.
Only used if all of mapnw, mapne, mapse and mapsw are left out.
maponly
(optional) if specified, only draws the map(s) and caption (if any).
namenw, namene, namese, namesw
What to write in the appropriate mid section of the legend.
name-full
A single name that fills the entire mid-section of the legend. (Overrides the other names)
name
Default text to use, if all other names are left out.
Automatically gets NW, NE, SW or SW appended where appropriate.
nw, ne, se, sw
Neighbouring graticules in the simple directions.
nnw, nne, ene, ese, sse, ssw, wsw, wnw
Neighbouring graticules due north, east, south, or west of one of the four graticules.
Directions are (approximately) relative to the mid-point of the four graticules.
n, e, s, w
Default values for otherwise unspecified north/east/south/west graticules.
caption
Extra stuff to include at the bottom of the box, like the caption text of an Image.

Example

{{GraticuleQ
| map = [[Image:MSP_Graticules.png]]
| namenw = Minneapolis NW
| namesw = Minneapolis SW
| namene = St. Paul NE
| namese = St. Paul SE
| nw = [[Brainerd, Minnesota|Brainerd]]
| nne = [[Duluth, Minnesota|Duluth]]
| ne = [[Hayward, Wisconsin|Hayward, WI]]
| wnw = [[St. Cloud, Minnesota|St. Cloud]]
| ene = [[Rice Lake, Wisconsin|Rice Lake, WI]]
| wsw = [[Hutchinson, Minnesota|Hutchinson]]
| ese = [[Eau Claire, Wisconsin|Eau Claire, WI]]
| sw = [[Estherville, Iowa|Estherville, IA]]
| ssw = [[Albert Lea, Minnesota|Albert Lea]]
| sse = [[Austin, Minnesota|Austin]]
| se = [[La Crosse, Wisconsin|La Crosse, WI]]
}}

See Also: Template:Graticule, Template:GraticuleH, Template:GraticuleV

Edit Documentation