Maps/Coordinates

From semantic-mediawiki.org
Maps extension
Overview
Installation and Configuration
Usage
Displaying maps
Customizing maps
Displaying GeoJSON
Geocoding
Converting coordinates
SMW integration
Storing coordinates
Aggregating onto a map
On this page


Maps provides the #coordinates parser function which allows conversion between all supported coordinate formats.

Syntax[edit]

{{#coordinates:<coordinates>|format=<coordinate format>|directional=<yes/no>}}

Parameters[edit]

Parameter Default Description
location required The coordinates you want to convert in any of the supported formats
format dms (changeable in wiki config with egMapsCoordinateNotation) The format to convert the coordinates to (available formats can be restricted in the wiki config with egMapsAvailableCoordNotations)
directional yes (changeable in wiki config with egMapsCoordinateDirectional) Indicates if the coordinates should be outputted directional or not. Must be either yes or no.

Examples[edit]

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' 20.83" N, 37° 37' 3.48" 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' 20.83" N, 37° 37' 3.48" W

Use of the coordinates tag extension.

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

Results into: 55° 45' 20.83" N, 37° 37' 3.48" W

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

Results into: 55.755786°, -37.617633°

See also[edit]