Template:Map: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
(Created page with "<includeonly><div style="position:relative; width: {{{width|}}}px; height: {{{height|}}}px; margin: auto;"> <div style="position:absolute; z: 10; top: 0px; left: 0px;"> File...")
 
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div style="position:relative; width: {{{width|}}}px; height: {{{height|}}}px; margin: auto;">
<includeonly><div class="mapContainer" style="position: relative; overflow: hidden; width: {{{width}}}px; height: {{{height}}}px; margin: auto; {{#if:{{{bg|}}}|background-color: {{{bg}}};}}">
<div style="position:absolute; z: 10; top: 0px; left: 0px;">
<div style="position: absolute; top: 0; left: 0;">[[File:{{{image}}}|{{{width}}}x{{{height}}}px|link=]]</div>
[[File:{{{image|}}}|link=]]
{{{icons|}}}
</div>
{{{items|}}}
</div></includeonly><noinclude>
</div></includeonly><noinclude>


Line 24: Line 22:
! icons
! icons
| No ||  || A collection of icons to place on the image. Use {{tem|map icon}} for this.
| No ||  || A collection of icons to place on the image. Use {{tem|map icon}} for this.
|-
! bg
| No ||  || Background color to use.
|}
|}


==Skeleton==
==Skeleton==
<pre>
<pre>
{{map | width = <width> | height = <height> | image = <image> | items =
{{map | width = <width> | height = <height> | image = <image> | bg = <background color> | icons =
{{map item | <icon> | <x> | <y> | <size> | <custom?>}}
{{map icon | <icon> | <x> | <y> | <size> | bg = <background?> | custom = <custom?>}}
}}
}}
</pre>
</pre>
Line 40: Line 41:
{{map icon | Hocotate ship | 132 | 181}}
{{map icon | Hocotate ship | 132 | 181}}
}}</pre>
}}</pre>
| {{ map | width = 368 | height = 232 | image = AW map cropped.jpg | icons =
| <div style="margin-bottom: 1em;">{{ map | width = 368 | height = 232 | image = AW map cropped.jpg | icons =
{{map icon | Hocotate ship | 132 | 181}}
{{map icon | Hocotate ship | 132 | 181}}
}}
}}</div>
|}
|}


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 15:34, March 22, 2023


Info

This template places an image on the article and allows it to be overlaid with icons. As such, it's useful to make interactable maps of areas with items of interest pointed out.

Parameters

Parameter Mandatory Default Detailed description
width Yes Width to display the image at.
height Yes Height to display the image at.
image Yes Name of the image file, with extension.
icons No A collection of icons to place on the image. Use {{map icon}} for this.
bg No Background color to use.

Skeleton

{{map | width = <width> | height = <height> | image = <image> | bg = <background color> | icons =
{{map icon | <icon> | <x> | <y> | <size> | bg = <background?> | custom = <custom?>}}
}}

Examples

Code Result
{{ map | width = 368 | height = 232 | image = AW map cropped.jpg | icons =
{{map icon | Hocotate ship | 132 | 181}}
}}
Overview of the Awakening Wood, cropped. From File:Mezame snap.jpg.
Hocotate ship icon.png