Template:Coord/doc/internals

Template:Coord consists of a number of subtemplates. This page provides an explanation of how the template uses these subtemplates.

Use cases
dec: 9°N, -9°W 1 2 3

d: 9°N, -9°W 1 2 3 4 5

dm: 9.15°N, -9.15°W 1 2 3 4 5 6 7

dms: 9.1525°N, -9.1525°W 1 2 3 4 5 6 7 8 9

Coord
Template:Coord

Input: Parameters 1, 2, 3, 4, 5, 6, 7, 8, 9, format, name

Pass all parameters to one of the following input templates:

The input templates differ on which parameters they use and what they do to them.

Coord/input/dec
Template:Coord/input/dec

Input: Parameters 1, 2, 3, format, name

Pass to Coord/link the following parameters:


 * dms-lat and dms-long: The latitude and longitude in degrees (minutes (and seconds)) format as text (and not separate parameters), using
 * Coord/prec dec to determine whether minutes and seconds are needed to cover the precision of the given number of decimal digits, and
 * Coord/dec2dms to split them to the necessary parts.
 * dec-lat and dec-long: Passed along as given.
 * param: URL parameters for use in Template:GeoTemplate
 * default: The format parameter, or "dec" if not given. Used in
 * name: Passed along as given.

Coord/input/d
Template:Coord/input/d

Input: Parameters 1, 2, 3, 4, 5, format, name

Pass to Coord/link the following parameters:


 * dms-lat and dms-long: The latitude and longitude in degrees (minutes (and seconds)) format as text (and not separate parameters), using
 * Coord/prec dec to determine whether minutes and seconds are needed to cover the precision of the given number of decimal digits, and
 * Coord/dec2dms to split them to the necessary parts.
 * dec-lat and dec-long: Passed along with signs from NSEW using Coord/dms2dec
 * param: URL parameters for use in Template:GeoTemplate
 * default: The format parameter, or "dec" if not given. Used in
 * name: Passed along as given.

Coord/input/dm
Template:Coord/input/dm

...

Coord/input/dms
Template:Coord/input/dms

...

Coord/link
Template:Coord/link

Input: Template:Coor URL and parameters dms-lat, dms-long, dec-lat, dec-long, param, name, default

Creates a link of the given coordinates, displaying the coordinate parameters as such. The default parameter controls which of dms or dec is shown, by using the geo classes in MediaWiki:Common.css, as described in UF-coord-classes

In addition, "geo" and the nested "latitude" and "longitude" have special meaning as a Geo microformat and so might also be used by other templates.

Coord/display/inline,title
Template:Coord/display/inline,title

...