Difference between revisions of "Template:GraticuleH/Documentation"

From Geohashing
imported>Joannac
m (Fixed edit link)
imported>Fippe
(Tønder → Westerland)
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
Usage:
+
<table style="float:right">
 +
<tr><td valign="top">
 +
{{GraticuleH
 +
|mapw=mapw
 +
|mape=mape
 +
|map=map
 +
|namee=namee
 +
|namew=namew
 +
|name=name
 +
|n=n
 +
|e=e
 +
|s=s
 +
|w=w
 +
|nw=nw
 +
|ne=ne
 +
|se=se
 +
|sw=sw
 +
|en=en
 +
|es=es
 +
|wn=wn
 +
|ws=ws
 +
|caption=Full Example
 +
}}
 +
</td><td valign="top">
 +
{{GraticuleH
 +
|map=map
 +
|name=name
 +
|n=n
 +
|e=e
 +
|s=s
 +
|w=w
 +
|nw=nw
 +
|ne=ne
 +
|se=se
 +
|sw=sw
 +
|caption=Minimal Example
 +
}}
 +
</td></tr>
 +
</table>
 +
{{GraticuleH
 +
| map = [[Image:Germany_Hamburg_Graticule.png]]
 +
| name = Hamburg
 +
| nw = [[54,8|Westerland]]
 +
| wn = [[54,9|Flensburg]]
 +
| en = [[Kiel,_Germany|Kiel]]
 +
| ne = [[54,11|Rødby, Denmark]]
 +
| e = [[Schwerin, Germany|Schwerin]]
 +
| se =  [[Magdeburg, Germany|Magdeburg]]
 +
| es = [[Braunschweig, Germany|Braunschweig]]
 +
| ws = [[Hannover, Germany|Hannover]]
 +
| sw = [[Bielefeld, Germany|Bielefeld]]
 +
| w = [[Bremen,_Germany|Bremen]]
 +
| caption = Real Example
 +
}}
 +
<noinclude>&lArr; [[Template:GraticuleH]]
  
<nowiki>{{graticuleH
+
</noinclude>A more ''awesome'' version of [[Template:Graticule]], designed for cities that occupy horizontally adjacent graticules.
| map = <map lat="123" lon="-45" date="2005-05-21"/>
 
| nw = [[Smalltown, USA|Smalltown]]
 
| s = [[Hayfields, USA|Hayfields]]
 
}}</nowiki>
 
  
This is for '''cities that are split horizontally over 2 graticules'''.
+
Originally made by [[User:Joannac|Joannac]], rewritten and overcomplicated by [[User:Mattyk|Matty]].
  
Make sure to not leave out the trailing slash on the <tt><nowiki><map... /></nowiki></tt>. Ideally, I'd like to avoid using <tt><nowiki><map></nowiki></tt> at all, but <tt><nowiki>{{#tag}}</nowiki></tt> doesn't seem to want to do the right thing here. [[User:Duskwolf|Duskwolf]] 00:22, 22 May 2008 (UTC)
+
==Parameters==
 +
(refer to the ''Full Example'' at right to see where each parameter goes)
 +
;mapw, mape
 +
:what to draw for the western/eastern map.
 +
;map
 +
:what to draw for the entire map.
 +
:Only used if both '''mapw''' and '''mape''' are left out.
 +
;maponly
 +
:''(optional)'' if specified, only draws the '''map''' and '''caption''' (if any).
 +
;namew, namee
 +
:What to write in the western/eastern mid section of the legend.
 +
;name-both
 +
:A single name that fills the entire mid-section of the legend. (Overrides '''namew''' and '''namee''')
 +
;name
 +
:Default text to use, if '''namew''', '''namee''', and '''name-both''' are all left out.
 +
:Automatically gets '''West''' and '''East''' appended where appropriate.
 +
;w, e
 +
;ne, nw, se, sw
 +
:Neighbouring graticules in the simple directions.
 +
;en, es, wn, ws
 +
:Neighbouring graticules to the north and south.
 +
:The first letter (''w'' or ''e'') determines weather the neighbour is adjacent to the western or eastern part of the twin graticule.
 +
;n, s
 +
:Default values for otherwise unspecified east/west graticules.
 +
;caption
 +
:Extra stuff to include at the bottom of the box, like the caption text of an Image.
  
Notes on usage:
+
==Example==
* You don't have to include neighbors that don't exist. The template will automatically insert a "-" for absent neighbors.
+
<pre><nowiki>
* You can automatically abbreviate links using the magic pipe: insert a | character at the end of the bracketed text: <tt><nowiki>[[Smalltown, USA|]]</nowiki></tt> is magically transformed (at save time) to <tt><nowiki>[[Smalltown, USA|Smalltown]]</nowiki></tt>.
+
{{GraticuleH
* You can add a "<code><nowiki>| maponly = 1</nowiki></code>" if you just want the map without the links to the surrounding graticules.
+
| map = [[Image:Germany_Hamburg_Graticule.png]]
* This uses: nww, nw, n, ne, w, e, sww, sw, s, se (yes I know it's inconsistent; no I don't care).
+
| name = Hamburg
 +
| nw = [[54,8|Westerland]]
 +
| wn = [[54,9|Flensburg]]
 +
| en = [[Kiel,_Germany|Kiel]]
 +
| ne = [[54,11|Rødby, Denmark]]
 +
| e = [[Schwerin, Germany|Schwerin]]
 +
| se =  [[Magdeburg, Germany|Magdeburg]]
 +
| es = [[Braunschweig, Germany|Braunschweig]]
 +
| ws = [[Hannover, Germany|Hannover]]
 +
| sw = [[Bielefeld, Germany|Bielefeld]]
 +
| w = [[Bremen,_Germany|Bremen]]
 +
}}
 +
</nowiki></pre>
  
 
+
See Also: [[Template:Graticule]], [[Template:GraticuleV]], [[Template:GraticuleQ]]
All articles using this template should use wikilink brackets (<nowiki>[[ and ]]</nowiki>) to link to the other neighboring graticules. Please don't change this article to link automatically, since neighboring graticules might have unwieldy names that would make more sense to be shortened (ie by using "<nowiki>[[Minneapolis SW, Minnesota|Minneapolis SW]]</nowiki>"). Work has been done to change existing articles to link to neighbors by the template user and not by the template. [[User:Ironiridis|Ironiridis]] 21:56, 22 May 2008 (UTC)
 
 
 
----
 
 
 
[http://wiki.xkcd.com/wgh/index.php?title=Template:GraticuleH/Documentation&action=edit Edit the documentation] (it isn't part of the template page)
 

Latest revision as of 21:21, 22 July 2019

nw wn en ne
w namew namee e
sw ws es se
mapw mape
Full Example
nw n n ne
w name West name East e
sw s s se
map
Minimal Example
Westerland Flensburg Kiel Rødby, Denmark
Bremen Hamburg West Hamburg East Schwerin
Bielefeld Hannover Braunschweig Magdeburg
Germany Hamburg Graticule.png
Real Example

Template:GraticuleH

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

Originally made by Joannac, rewritten and overcomplicated by Matty.

Parameters

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

mapw, mape
what to draw for the western/eastern map.
map
what to draw for the entire map.
Only used if both mapw and mape are left out.
maponly
(optional) if specified, only draws the map and caption (if any).
namew, namee
What to write in the western/eastern mid section of the legend.
name-both
A single name that fills the entire mid-section of the legend. (Overrides namew and namee)
name
Default text to use, if namew, namee, and name-both are all left out.
Automatically gets West and East appended where appropriate.
w, e
ne, nw, se, sw
Neighbouring graticules in the simple directions.
en, es, wn, ws
Neighbouring graticules to the north and south.
The first letter (w or e) determines weather the neighbour is adjacent to the western or eastern part of the twin graticule.
n, s
Default values for otherwise unspecified east/west graticules.
caption
Extra stuff to include at the bottom of the box, like the caption text of an Image.

Example

{{GraticuleH
| map = [[Image:Germany_Hamburg_Graticule.png]]
| name = Hamburg
| nw = [[54,8|Westerland]]
| wn = [[54,9|Flensburg]]
| en = [[Kiel,_Germany|Kiel]]
| ne = [[54,11|Rødby, Denmark]]
| e = [[Schwerin, Germany|Schwerin]]
| se =  [[Magdeburg, Germany|Magdeburg]]
| es = [[Braunschweig, Germany|Braunschweig]]
| ws = [[Hannover, Germany|Hannover]]
| sw = [[Bielefeld, Germany|Bielefeld]]
| w = [[Bremen,_Germany|Bremen]]
}}

See Also: Template:Graticule, Template:GraticuleV, Template:GraticuleQ