Template:On the map: Difference between revisions
Appearance
Create: page-top-right ๐ On the map indicator (coords or node/way/relation), the page-level counterpart of Coordslink ย |
Coordinate mode now drops a marker (mlat/mlon) instead of linking a node page; scope note: for spot-like subjects, not continents/polities ย |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{node|}}}{{{way|}}}{{{relation|}}}{{{1|}}}|<indicator name="on-the-map"><span class="plainlinks">[{{#if:{{{node|}}}|//yezur.xyz/node/{{{node}}}|{{#if:{{{way|}}}|//yezur.xyz/way/{{{way}}}|{{#if:{{{relation|}}}|//yezur.xyz/relation/{{{relation}}}| | <includeonly>{{#if:{{{node|}}}{{{way|}}}{{{relation|}}}{{{1|}}}|<indicator name="on-the-map"><span class="plainlinks">[{{#if:{{{node|}}}|//yezur.xyz/node/{{{node}}}|{{#if:{{{way|}}}|//yezur.xyz/way/{{{way}}}|{{#if:{{{relation|}}}|//yezur.xyz/relation/{{{relation}}}|//yezur.xyz/?mlat={{{1}}}&mlon={{{2}}}#map={{{3|8}}}/{{{1}}}/{{{2}}}}}}}}} ๐ {{{label|On the map}}}]</span></indicator>}}</includeonly><noinclude> | ||
=== Usage === | === Usage === | ||
Places a small '''๐ On the map''' link at the top right of the page, beside the title | Places a small '''๐ On the map''' link at the top right of the page, beside the title โ for subjects that resolve to '''a spot on the map''' (cities, sites, locations; ''not'' continents or countries, which cannot be reduced to a single point). The link opens the Yezur map with '''a marker dropped''' at the given coordinates. It renders through MediaWiki's page-status-indicator mechanism, so it works wherever it is placed in the wikitext; by convention, put it on the first line of the article. | ||
* <code><nowiki>{{On the map|38.09735|-70.67385}}</nowiki></code> โ drop a marker there (zoom 8) | |||
* <code><nowiki>{{On the map| | * <code><nowiki>{{On the map|38.09735|-70.67385|13}}</nowiki></code> โ same, explicit zoom | ||
* <code><nowiki>{{On the map| | |||
For a line or area feature, link its map-object page instead of dropping a marker: | |||
* <code><nowiki>{{On the map| | * <code><nowiki>{{On the map|way=123456}}</nowiki></code> ยท <code><nowiki>{{On the map|relation=481363}}</nowiki></code> ยท <code><nowiki>{{On the map|node=60111}}</nowiki></code> | ||
; <code>1</code>, <code>2</code>, <code>3</code> : latitude, longitude, zoom (optional, default 8) | ; <code>1</code>, <code>2</code>, <code>3</code> : latitude, longitude, zoom (optional, default 8) | ||
; <code>node</code> / <code>way</code> / <code>relation</code> : link | ; <code>node</code> / <code>way</code> / <code>relation</code> : link a map object's page instead of dropping a marker | ||
; <code>label</code> : optional text replacing "On the map" | ; <code>label</code> : optional text replacing "On the map" | ||
If the template appears more than once on a page, the '''last''' use wins (the indicator name is shared) | If the template appears more than once on a page, the '''last''' use wins (the indicator name is shared). | ||
Live demonstration โ top right of this very page: {{On the map|38.09735|-70.67385|13|label=On the map (demo)}} | |||
ย | |||
Live demonstration โ | |||
[[Category:Link templates]] | [[Category:Link templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 08:18, 17 July 2026
Usage
Places a small ๐ On the map link at the top right of the page, beside the title โ for subjects that resolve to a spot on the map (cities, sites, locations; not continents or countries, which cannot be reduced to a single point). The link opens the Yezur map with a marker dropped at the given coordinates. It renders through MediaWiki's page-status-indicator mechanism, so it works wherever it is placed in the wikitext; by convention, put it on the first line of the article.
{{On the map|38.09735|-70.67385}}โ drop a marker there (zoom 8){{On the map|38.09735|-70.67385|13}}โ same, explicit zoom
For a line or area feature, link its map-object page instead of dropping a marker:
{{On the map|way=123456}}ยท{{On the map|relation=481363}}ยท{{On the map|node=60111}}
1,2,3- latitude, longitude, zoom (optional, default 8)
node/way/relation- link a map object's page instead of dropping a marker
label- optional text replacing "On the map"
If the template appears more than once on a page, the last use wins (the indicator name is shared).
Live demonstration โ top right of this very page: