Difference between revisions of "Template:Graticule2"
From Geohashing
imported>Mattyk (Added includeonly tags) |
imported>Mattyk (widened the hyphens to en-dashes) |
||
Line 6: | Line 6: | ||
{{#vardefine:w|{{#switch:{{{lon|0}}}|0=-0|{{#expr:({{{lon|0}}} - 1)}} }} }} | {{#vardefine:w|{{#switch:{{{lon|0}}}|0=-0|{{#expr:({{{lon|0}}} - 1)}} }} }} | ||
<tr> | <tr> | ||
− | <td style="text-align:left;width:7em" width="7em">'''{{#if:{{{nw|}}} | {{{nw}}} | [[{{#var:n}},{{#var:w}}| | + | <td style="text-align:left;width:7em" width="7em">'''{{#if:{{{nw|}}} | {{{nw}}} | [[{{#var:n}},{{#var:w}}|–]] }}'''</td> |
− | <td style="text-align:center;width:8em" width="8em">'''{{#if:{{{n|}}} | {{{n}}} | [[{{#var:n}},{{{lon|0}}}| | + | <td style="text-align:center;width:8em" width="8em">'''{{#if:{{{n|}}} | {{{n}}} | [[{{#var:n}},{{{lon|0}}}|–]] }}'''</td> |
− | <td style="text-align:right;width:7em" width="7em">'''{{#if:{{{ne|}}} | {{{ne}}} | [[{{#var:n}},{{#var:e}}| | + | <td style="text-align:right;width:7em" width="7em">'''{{#if:{{{ne|}}} | {{{ne}}} | [[{{#var:n}},{{#var:e}}|–]] }}'''</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td style="text-align:left;width:7em" width="7em">'''{{#if:{{{w|}}} | {{{w}}} | [[{{{lat|0}}},{{#var:w}}| | + | <td style="text-align:left;width:7em" width="7em">'''{{#if:{{{w|}}} | {{{w}}} | [[{{{lat|0}}},{{#var:w}}|–]] }}'''</td> |
<td style="text-align:center;width:8em" width="8em">'''{{{name|{{PAGENAME}}}}}'''</td> | <td style="text-align:center;width:8em" width="8em">'''{{{name|{{PAGENAME}}}}}'''</td> | ||
− | <td style="text-align:right;width:7em" width="7em">'''{{#if:{{{e|}}} | {{{e}}} | [[{{{lat|0}}},{{#var:e}}| | + | <td style="text-align:right;width:7em" width="7em">'''{{#if:{{{e|}}} | {{{e}}} | [[{{{lat|0}}},{{#var:e}}|–]] }}'''</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td style="text-align:left;width:7em" width="7em">'''{{#if:{{{sw|}}} | {{{sw}}} | [[{{#var:s}},{{#var:w}}| | + | <td style="text-align:left;width:7em" width="7em">'''{{#if:{{{sw|}}} | {{{sw}}} | [[{{#var:s}},{{#var:w}}|–]] }}'''</td> |
− | <td style="text-align:center;width:8em" width="8em">'''{{#if:{{{s|}}} | {{{s}}} | [[{{#var:s}},{{{lon|0}}}| | + | <td style="text-align:center;width:8em" width="8em">'''{{#if:{{{s|}}} | {{{s}}} | [[{{#var:s}},{{{lon|0}}}|–]] }}'''</td> |
− | <td style="text-align:right;width:7em" width="7em">'''{{#if:{{{se|}}} | {{{se}}} | [[{{#var:s}},{{#var:e}}| | + | <td style="text-align:right;width:7em" width="7em">'''{{#if:{{{se|}}} | {{{se}}} | [[{{#var:s}},{{#var:e}}|–]] }}'''</td> |
</tr> | </tr> | ||
<!-- Put any additional fields above here. -->}} | <!-- Put any additional fields above here. -->}} |
Revision as of 04:26, 14 December 2008
Edit the documentation (it isn't part of the template page)
– | Rapid City | – |
– | Graticule2 | – |
Torrington | – | – |
Usage:
{{graticule2 | lat = 43 | lon = -103 | n = [[Rapid City, South Dakota|]] | sw = [[Torrington, Wyoming|]] }}
Notes on usage:
- As per Template:Graticule, you can specify | map = ... and | name = ... parameters if you wish.
- You don't have to include neighbors that don't exist. The template will automatically insert a "–" for absent neighbors. This dash now acts as a link to the missing graticule.
- You can automatically abbreviate links using the magic pipe: insert a | character at the end of the bracketed text: [[Smalltown, USA|]] is magically transformed (at save time) to [[Smalltown, USA|Smalltown]].
- You can add a "
| maponly = 1
" if you just want the map without the links to the surrounding graticules. - You can add a "
| point= 1
" if you want the map to show the (approximately) current hash point for the graticule.
All articles using this template should use wikilink brackets ([[ and ]]) to link to the other neighboring graticules.