Help:Coordinates 0.6.6

From Mapping on MediaWiki
Jump to: navigation, search

User manual




Displaying maps

Displaying markers

Customizing markers

Mapping services

Semantic mapping

Coordinates data-type

Querying coordinate data

Distance query

Maps in forms

Admin manual

Maps supports several coordinate notations which you can use in all the functionality added by it, and it's extensions.

This documentation applies for Maps version 0.6 and later. See this page for pre 0.6 docs.

Supported formats

All underneath formats are supported in both directional and non-directional notation. Directional notation uses letters such as N, E, S and W to indicate the 'direction' of a value, where non-directional notation uses positive and negative values.


Parameter value: float

  • Directional: 55.7557860 N, 37.6176330 W
  • Non-directional: 55.7557860, -37.6176330

Decimal Degrees

Parameter value: dd

  • Directional: 55.7557860° N, 37.6176330° W
  • Non-directional: 55.7557860°, -37.6176330°

Decimal Minutes

Parameter value: dm

  • Directional: 55° 45.347' N, 37° 37.058' E
  • Non-directional: 55° 45.347', 37° 37.058'

Degrees Minutes Seconds

Parameter value: dms

  • Directional: 55° 45' 21" N, 37° 37' 3" W
  • Non-directional: 55° 45' 21", -37° 37' 3"

Formatting coordinates

You can format coordinates using the #coordinates parser function.


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


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.


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

  • #Geodistance - A parser function for finding the distance between two locations.
  • #Finddestination - A parser function for finding a location giving a starting point, an initial bearing, and a distance.
This documentation page applies to all (Semantic) Maps versions from 0.1 to 0.6.6.
Other versions: ≥ 0.7      

Help:Coordinates en 0.1 0.6.6