Template:Coords: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Caesar Schinas
(Hoping to consolidate Template:Coord_DM and Template:Coord_DMS)
 
imported>Caesar Schinas
m (brackets...)
 
Line 1: Line 1:
<includeonly>{{#if:{{8|}}
<includeonly>{{#if:{{{8|}}}
  |{{#switch: {{{4}}}
  |{{#switch: {{{4}}}
   |W|w|E|e = {{{5}}}°{{{6}}}′{{{7}}}”{{{8}}}, {{{1}}}°{{{2}}}′{{{3}}}”{{{4}}}
   |W|w|E|e = {{{5}}}°{{{6}}}′{{{7}}}”{{{8}}}, {{{1}}}°{{{2}}}′{{{3}}}”{{{4}}}

Latest revision as of 12:12, 10 May 2009

This documentation is transcluded from Template:Coords/doc (edit | history)

This template is for inserting geographical coordinates.

It can be used for coordinates in degrees, minutes, and seconds, or coordinates in just degrees and minutes, depending upon the number of parameters.


Usage

The template takes either six or eight parameters, depending upon the desired format for the coordinates.
The variables are therefore {{Coords|deg|min|sec|LAT|deg|min|sec|LON}}, where the two sec variables are optional.
To use the template you can copy and paste one of the examples below, depending on the desired format, and replace the numbers.


Example

DMS format (degrees, minutes, and seconds)
{{Coords|12|34|56|N|12|34|56|W}} gives 12°34′56”N, 12°34′56”W.
DM format (degrees and minutes)
{{Coords|12|34.56|N|12|34.56|W}} gives 12°34.56′N, 12°34.56′W.