Difference between revisions of "Template:Coordinates"
Jump to navigation
Jump to search
(Select map layer and add zoom parameter) |
(Example for zoom + some info abotu update) |
||
Line 2: | Line 2: | ||
I created this template and moved it to "Earth coordinates". I want it to do two things: be both human-readable and have a map link. - [[User:6r1d]] | I created this template and moved it to "Earth coordinates". I want it to do two things: be both human-readable and have a map link. - [[User:6r1d]] | ||
+ | |||
+ | Updated to handle all layers dynamically based on y coordinate. Not Earth specific anymore and should be used for all coordinates. | ||
=== Example === | === Example === | ||
Use following code: | Use following code: | ||
− | <pre>{{ | + | <pre>{{Coordinates |x=123 |y=234 |z=345}}</pre> |
To get following link: | To get following link: | ||
− | {{ | + | {{Coordinates |x=123 |y=234 |z=345}} |
+ | |||
+ | You can also set zoom level to something other than default 12: | ||
+ | |||
+ | <pre>{{Coordinates |zoom=8 |x=123 |y=234 |z=345}}</pre> | ||
+ | |||
[[Category:Template]] | [[Category:Template]] | ||
<includeonly><onlyinclude><code>[https://pandorabox.io/map/#!/map/{{#ifexpr:{{{y}}} < 5000 | 0 | {{#ifexpr:{{{y}}} < 6000 | 1 | {{#ifexpr:{{{y}}} < 11000 | 2 | 3 }} }} }}/{{{zoom|12}}}/{{{x}}}/{{{z}}} '''X''': {{{x}}} '''Y''': {{{y}}} '''Z''': {{{z}}}]</code></onlyinclude></includeonly> | <includeonly><onlyinclude><code>[https://pandorabox.io/map/#!/map/{{#ifexpr:{{{y}}} < 5000 | 0 | {{#ifexpr:{{{y}}} < 6000 | 1 | {{#ifexpr:{{{y}}} < 11000 | 2 | 3 }} }} }}/{{{zoom|12}}}/{{{x}}}/{{{z}}} '''X''': {{{x}}} '''Y''': {{{y}}} '''Z''': {{{z}}}]</code></onlyinclude></includeonly> |
Revision as of 19:23, 16 January 2021
Description
I created this template and moved it to "Earth coordinates". I want it to do two things: be both human-readable and have a map link. - User:6r1d
Updated to handle all layers dynamically based on y coordinate. Not Earth specific anymore and should be used for all coordinates.
Example
Use following code:
{{Coordinates |x=123 |y=234 |z=345}}
To get following link:
You can also set zoom level to something other than default 12:
{{Coordinates |zoom=8 |x=123 |y=234 |z=345}}