Difference between revisions of "Template:LocFormat"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
| − | Template to format coordinates in decimal degrees | + | Template to format coordinates in decimal degrees with optional transport. |
==== Usage ==== | ==== Usage ==== | ||
<pre>{{LocFormat | <pre>{{LocFormat | ||
|coordinates | |coordinates | ||
|format=dd | |format=dd | ||
| − | | | + | |transport=bike}}</pre> |
| − | {{LocFormat|43° 16' 28.74" N, 2° 1' 16.69" W }} | + | |
| + | ==== Examples ==== | ||
| + | * Without transport: | ||
| + | {{LocFormat|43° 16' 28.74" N, 2° 1' 16.69" W}} | ||
| + | → 43.27465, -2.02130 | ||
| + | |||
| + | * With transport: | ||
| + | {{LocFormat|43° 16' 28.74" N, 2° 1' 16.69" W|transport=train}} | ||
| + | → 43.27465, -2.02130:train | ||
| + | |||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude> | </noinclude> | ||
| − | <includeonly>{{#coordinates:{{{1}}}|format={{{format|dd}}}|directional=yes}}</includeonly> | + | <includeonly>{{#coordinates:{{{1}}}|format={{{format|dd}}}|directional=yes}}{{#if:{{{transport|}}}|:{{{transport|}}}|}}</includeonly> |
Revision as of 08:32, 19 January 2025
Template to format coordinates in decimal degrees with optional transport.
Usage
{{LocFormat
|coordinates
|format=dd
|transport=bike}}
Examples
- Without transport:
43.274650° N, 2.021303° W → 43.27465, -2.02130
- With transport:
43.274650° N, 2.021303° W
- train
→ 43.27465, -2.02130:train