Coordinates

From Mapping on MediaWiki
Jump to: navigation, search
Coordinates
What:
Formats coordinates
Min version:
0.6
Max version:
still supported
Function implementation:
Yes
Tag implementation:
Yes


You can use the #coordinates parser function to format coordinates, from and to any of the supported formats. This function is part of the Maps extension, so you should have Maps installed in order to use it.

Usage

Syntax

{{#coordinates:{your coordinates}|format={your format}|directional={yes/no}}}

Parameters

This parser function supports use of so called 'default parameters'. This allows you to simply pass along values, without writing the parameter name= part. You can mix this notation together with using named parameters, but must at all times keep the default ones in the correct order. This order is location, format and directional.

Parameter Aliases Default Usage
location - required The coordinates you want to format.
format notation configurable The target format for the coordinates.
directional - configurable Indicates if the coordinates should be outputted directional or not. Must be either yes or no.

Examples

Coordinates in directional decimal degrees to the default target format.

{{#coordinates:55.7557860° N, 37.6176330° W}}
{{#coordinates:location=55.7557860° N, 37.6176330° W}}

All result into: 55° 45' 21" N, 37° 37' 3" W

Coordinates in non-directional floats to directional DMS.

{{#coordinates:55.7557860, -37.6176330|format=dms|directional=yes}}
{{#coordinates:55.7557860, -37.6176330|dms|yes}}
{{#coordinates:55.7557860, -37.6176330|directional=yes|dms}}

All result into: 55° 45' 21" N, 37° 37' 3" W

Use of the coordinates tag extension.

<coordinates format="dms">55.7557860, -37.6176330</coordinates>

Results into: 55° 45' 21" N, 37° 37' 3" W

<coordinates format="dd" directional="no">55.7557860, -37.6176330</coordinates>

Results into: 55.755786°, -37.617633°

See also

This documentation page applies to all (Semantic) Maps versions from 0.7 to the most current version.
Other versions: 0.6 – 0.6.6      

Coordinates en 0.7