Template:MapLink: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
(make a map link if called by api, otherwise make a wiki link)
(add pin link to map)
Line 1: Line 1:
<includeonly>{{#ifeq:{{PAGENAME}}|API|<span class="internal-link" {{#if:{{{3|}}}|data-lat="{{{2}}}" data-lng="{{{3}}}"|data-target="{{{1}}}"}}>{{{1}}}</span>|[[{{{1}}}]]}}</includeonly><noinclude>{{Documentation}}</noinclude>
<includeonly>{{#ifeq:{{PAGENAME}}|API|<span class="internal-link" {{#if:{{{3|}}}|data-lat="{{{2}}}" data-lng="{{{3}}}"|data-target="{{{1}}}"}}>{{{1}}}</span>|[[{{{1}}}]][[File:Pin.png|x16px|link=https://www.zeldadungeon.net/breath-of-the-wild-interactive-map/?{{#if:{{{3|}}}|lat{{=}}{{{2}}}&lng{{=}}{{{3}}}|id{{=}}{{#replace:{{{1}}}||%20}}}}]]}}</includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 19:47, March 10, 2017

[Edit Documentation] This template creates an element that is understood by the Breath of the Wild Map as an internal link to another location. Clicking on this link will pan the map (or jump if far away) to the given location.

Usage

{{MapLink| text | id }}

  • text — Display text that the user clicks. If lat and lng aren't supplied, this also doubles as the target id to link to.
  • id — ID for the target to link to. (Optional.)

Example

<section begin=summary />'''Shrine Quest:''' {{MapLink|The Stolen Heirloom}}<section end=summary />

Shrine Quest: The Stolen HeirloomPin.png

(visit the map to see example output in map format)