Template:Coords: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
m (brackets)
(page override parameter)
Line 1: Line 1:
<includeonly>{{nobr|<!--
<includeonly>{{nobr|<!--


-->({{formatnum:{{{x|{{{1|{{#explode:{{#show:{{PAGENAME}}|?Has coordinates|valuesep=;}}|;}}}}}}}}|R}}, <!--
-->({{formatnum:{{{x|{{{1|{{#explode:{{#show:{{{page|{{PAGENAME}}}}}|?Has coordinates|valuesep=;}}|;}}}}}}}}|R}}, <!--
-->{{formatnum:{{{y|{{{2|{{#explode:{{#show:{{PAGENAME}}|?Has coordinates|valuesep=;}}|;|1}}}}}}}}|R}}, <!--
-->{{formatnum:{{{y|{{{2|{{#explode:{{#show:{{{page|{{PAGENAME}}}}}|?Has coordinates|valuesep=;}}|;|1}}}}}}}}|R}}, <!--
-->{{formatnum:{{{z|{{{3|{{#explode:{{#show:{{PAGENAME}}|?Has coordinates|valuesep=;}}|;|2}}}}}}}}|R}})}} <!--
-->{{formatnum:{{{z|{{{3|{{#explode:{{#show:{{{page|{{PAGENAME}}}}}|?Has coordinates|valuesep=;}}|;|2}}}}}}}}|R}})}} <!--


--><copylink text="/thumbtack
--><copylink text="/thumbtack
{{formatnum:{{{x|{{{1|{{#explode:{{#show:{{PAGENAME}}|?Has coordinates|valuesep=;}}|;}}}}}}}}|R}}
{{formatnum:{{{x|{{{1|{{#explode:{{#show:{{{page|{{PAGENAME}}}}}|?Has coordinates|valuesep=;}}|;}}}}}}}}|R}}
{{formatnum:{{{y|{{{2|{{#explode:{{#show:{{PAGENAME}}|?Has coordinates|valuesep=;}}|;|1}}}}}}}}|R}}
{{formatnum:{{{y|{{{2|{{#explode:{{#show:{{{page|{{PAGENAME}}}}}|?Has coordinates|valuesep=;}}|;|1}}}}}}}}|R}}
{{formatnum:{{{z|{{{3|{{#explode:{{#show:{{PAGENAME}}|?Has coordinates|valuesep=;}}|;|2}}}}}}}}|R}}">[Copy]</copylink> </includeonly><noinclude>
{{formatnum:{{{z|{{{3|{{#explode:{{#show:{{{page|{{PAGENAME}}}}}|?Has coordinates|valuesep=;}}|;|2}}}}}}}}|R}}">[Copy]</copylink> </includeonly><noinclude>
{{documentation}}</noinclude>
{{documentation}}</noinclude>

Revision as of 07:23, 18 May 2022

[edit] [purge] Documentation

Usage

This template uses {{nobr}} to make sure that no line breaks occur in the middle of a coordinates string. It also puts the numbers in parentheses and separates them with commas.

If no numbers are provided, the numbers come from the "Has coordinates" property of the same page, or the page given as the "page" parameter. If multiple sets of coordinates exist, the "n" parameter (default 1) selects which set to display, with the first set numbered 1.

Examples

{{coords|10.0|20.0|30.0}}
(10.0, 20.0, 30.0) [Copy]
{{coords|x=10.0|y=20.0|z=30.0}}
(10.0, 20.0, 30.0) [Copy]
{{coords}}
output based on "Has coordinates" properties defined on the page
{{coords|page=Top Dog Badge}}
(Atlas Park (131.0 319.7 -319.5), , ) [Copy]
{{coords|page=Rail Rider Badge}}{{coords|page=Rail Rider Badge|n=2}}{{coords|page=Rail Rider Badge|n=3}}
(Nova Praetoria (-4551.0 -187.6 469.5), Imperial City (-2384.0 -238.6 755.5), Neutropolis (2226.0 -213.1 1111.0)) [Copy] (Nova Praetoria (-4551.0 -187.6 469.5), Imperial City (-2384.0 -238.6 755.5), Neutropolis (2226.0 -213.1 1111.0)) [Copy] (Nova Praetoria (-4551.0 -187.6 469.5), Imperial City (-2384.0 -238.6 755.5), Neutropolis (2226.0 -213.1 1111.0)) [Copy]