Difference between revisions of "Template:LocFormat"
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
== Decimal Degrees (format=dd) == | == Decimal Degrees (format=dd) == | ||
* {{LocFormat|55° 45' 20.83" N, 37° 37' 3.48" W|format=dd}} | * {{LocFormat|55° 45' 20.83" N, 37° 37' 3.48" W|format=dd}} | ||
+ | |||
== Decimal Minutes (format=dm) == | == Decimal Minutes (format=dm) == | ||
Line 31: | Line 32: | ||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude> | </noinclude> | ||
− | <includeonly>{{#coordinates:{{{1}}}|format={{{format|dd}}}|directional=yes}}</includeonly> | + | <includeonly>{{#coordinates:{{{1}}}|format={{{format|dd}}}|directional={{{directional|yes}}}}}</includeonly> |
Revision as of 08:51, 19 January 2025
Template to format coordinates see https://maps.extension.wiki/wiki/Coordinate_formats. Default is decimal degrees.
Usage
{{LocFormat |coordinates |format=dd |directional=yes}}
Parameters
- {{{1}}}: The coordinate string to format
- format: Output format - one of float, dd (decimal degrees), dm (decimal minutes) or dms (degrees minutes seconds)
- directional: Whether to show direction indicators (N/S/E/W) - default is yes
Examples
Floats (format=float)
55.755786 N, 37.617633 W
55.755786, -37.617633
Decimal Degrees (format=dd)
55.755786° N, 37.617633° W
Decimal Minutes (format=dm)
55° 45.3472' N, 37° 37.0580' W
Degrees Minutes Seconds (format=dms)
55° 45' 20.83" N, 37° 37' 3.48" W