Template:MapLink/Documentation: Difference between revisions

Want an adless experience? Log in or Create an account.
m
no edit summary
No edit summary
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
This template has two behaviors depending on whether it's displayed on a page or called by the API. On a page, it generates a simple wikilink with a pin icon linking to the [[Zelda Dungeon:Breath of the Wild Map|Breath of the Wild Map]]. Called by the API (i.e. from the map), it creates an element that is understood by the 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.
This template creates an element that is understood by the [[Zelda Dungeon:Breath of the Wild Map|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==
==Usage==
{{Usage|text|lat|lng}}
{{Usage|text|id}}
{{Usage/Param|text|Display text that the user clicks. If lat and lng aren't supplied, this also doubles as the target id to link to.}}
{{Usage/Param|text|Display text that the user clicks. If lat and lng aren't supplied, this also doubles as the target id to link to.}}
{{Usage/Param|lat|Latitude of the target as defined in its {{Temlink|Pin}} template.|optional}}
{{Usage/Param|id|ID for the target to link to.|optional}}
{{Usage/Param|lng|Longitude of the target as defined in its {{Temlink|Pin}} template.|optional}}
 
The <code>text</code> parameter may be omitted to create only the pin icon linking to the location of the article's subject on the map, as long as the template isn't included in the map.


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


(visit the map to see example output in map format)
(visit the map to see example output in map format)<noinclude>{{cat|Template Documentation}}</noinclude>