Difference between revisions of "Template:Search map"

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="search-map {{{size|}}}">
<includeonly><div class="search-map {{{size|}}}" style="{{#if:{{{css-float|}}}|float:{{{css-float|}}};}}">
   <div class="map-frame">
   <div class="map-frame">
     <div class="map-title">{{{title|Search map}}}</div>
     <div class="map-title">{{{title|Search map}}}</div>
     <div class="map"><div class="inner-border">[[File:Ruby Sea HQ Map.jpg|{{#switch:{{{size|}}}|big=1000|medium=750|#default=500}}px|link=]]</div><!--
     <div class="map"><div class="inner-border">[[{{#if:{{{image|}}}|File:{{{image}}}|{{#show:{{{1|}}}|?Has map image|link=none}}}}|{{#switch:{{{size|small}}}|big=1000|medium=750|small=500}}px|link=]]</div><!--
-->{{#if:{{{coordinates|}}}|{{#arraymap:{{{coordinates|}}}|;|@@@|<!-- Params -->{{#vardefine:searchmap_coords|{{#explode:@@@|>|0}}}}{{#vardefine:searchmap_typeicon|{{#explode:@@@|>|1}}}}{{#vardefine:searchmap_label|{{#explode:@@@|>|2}}}}<!--
-->{{#if:{{{coordinates|}}}|{{#arraymap:{{{coordinates|}}}|;|@@@|<!-- Params -->{{#vardefine:searchmap_coords|{{#explode:@@@|>|0}}}}{{#vardefine:searchmap_typeicon|{{#explode:@@@|>|1}}}}{{#vardefine:searchmap_label|{{#explode:@@@|>|2}}}}<!--
     --><div class="marker" style="top: {{#explode:{{#var:searchmap_coords}}|,|0}}px; left: {{#explode:{{#var:searchmap_coords}}|,|1}}px;" title="{{#var:searchmap_label|{{{marker-label|Marker}}}}}">[[File:{{#if:{{#var:searchmap_typeicon|}}|<!--
     --><div class="marker" style="{{Search map/map coords|{{{size|}}}|{{#vardefineecho:searchmap_coord_x|{{#explode:{{#var:searchmap_coords}}|,|0}}}}|{{#vardefineecho:searchmap_coord_y|{{#explode:{{#var:searchmap_coords}}|,|1}}}}}}<!-- End map -->{{#vardefine:searchmap_coord_z|{{#explode:{{#var:searchmap_coords}}|,|2}}}}" title="{{#var:searchmap_label|{{{marker-label|Marker}}}}} (x:{{#var:searchmap_coord_x|??}}, y:{{#var:searchmap_coord_y|??}}{{#if:{{#var:searchmap_coord_z}}|, z:{{#var:searchmap_coord_z}}}})">[[File:{{#if:{{#var:searchmap_typeicon|}}|<!--
     -->{{#switch:{{#var:searchmap_typeicon|}}
     -->{{#switch:{{#var:searchmap_typeicon|}}
       | creature = Aggressive difficulty r4.png
       | creature = Aggressive difficulty r4.png
       | flag    = Flag marker.png}}|Flag marker.png}}|{{{marker-size|32}}}px|link=]]</div>
       | flag    = Flag marker.png}}|Flag marker.png}}|{{{marker-size|{{#switch:{{{size|small}}}|big=32|medium=28|small=20}}}}}px|link=]]</div>


|}}}}</div>
|}}}}</div>
   </div>{{#if:{{{no-caption|}}}||<div class="caption">This is the caption</div>}}
   </div><!--{{#if:{{{no-caption|}}}||<div class="caption">This is the caption</div>}}-->
</div></includeonly><noinclude>
</div></includeonly><noinclude>
== Description ==
== Description ==
Displays a map with optional flags which can be marked onto it, using in-game coordinates.
Displays a map with optional flags which can be marked onto it, using in-game coordinates.
<pre>{{Search map
<pre>{{Search map
|<unnamed param1>
| <unnamed param1>
| coordinates =  
| coordinates =  
| title =  
| title =  
Line 23: Line 23:
| marker-label =  
| marker-label =  
| marker-size =  
| marker-size =  
| no-caption =  
| css-float =  
}}</pre>
}}</pre>


Line 30: Line 30:
: The pagename from which to pull the map through property <code>Has map image</code>. Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
: The pagename from which to pull the map through property <code>Has map image</code>. Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
; coordinates
; coordinates
: The coordinates to mark on the map. It uses the following form separated by semi-colons: <code><x,y,z>|<type>|<label></code>.
: The coordinates to mark on the map. It uses the following form separated by semi-colons: <code><x,y,z>'''>'''<type>'''>'''<label></code>.
: '''Example:''' <code>12.5,7.4||Cool label</code>
: '''Example:''' <code>12.5,7.4'''>>'''Cool label</code>
; title
; title
: Optional. The search map title. Defaults to "Search map".
: Optional. The search map title. Defaults to "Search map".
Line 43: Line 43:
: Optional. The marker label to be used as default for all markers.
: Optional. The marker label to be used as default for all markers.
; marker-size
; marker-size
: Optional. The marker icon size to be used as default for all markers. Defaults to 32px.
: Optional. The marker icon size to be used as default for all markers. Defaults to 20px.
; no-caption
<!--; no-caption
: Optional. Set anything to disable caption.
: Optional. Set anything to disable caption.-->
; css-float
: Optional. Used to make the map float either right or left.


== Examples ==
== Examples ==
<pre>{{Search map}}</pre>
<pre>{{Search map
{{Search map}}
| image = Ruby Sea HQ Map.jpg
}}</pre>
{{Search map
| image = Ruby Sea HQ Map.jpg
}}


<pre>{{Search map
<pre>{{Search map
| size = medium
| image = Yanxia HQ Map.jpg
| coordinates = 10,10;100,400;200,600;300,700
| size = big
| coordinates = 28,11;26,10;23,11;21,9;17,13;18,16;12,30;17,34
}}</pre>
}}</pre>
{{Search map
{{Search map
| size = medium
| image = Yanxia HQ Map.jpg
| coordinates = 10,10;100,400;200,600;300,700
| size = big
| coordinates = 28,11;26,10;23,11;21,9;17,13;18,16;12,30;17,34
}}
}}


<pre>{{Search map
<pre>{{Search map
| image = Ruby Sea HQ Map.jpg
| title = White Joker Locations
| title = White Joker Locations
| coordinates = 300,400;30,300>creature>Special Mark!;100,80;200,100>flag>Flag Mark!
| coordinates = 300,400;30,300>creature>Special Mark!;100,80;200,100>>Flag Mark!
| marker-type = creature
| marker-type = creature
| marker-label = Hunting Mark
| marker-label = Hunting Mark
| no-caption = y
}}</pre>
}}</pre>
{{Search map
{{Search map
| image = Ruby Sea HQ Map.jpg
| title = White Joker Locations
| title = White Joker Locations
| coordinates = 300,400;30,300>creature>Special Mark!;100,80;200,100>flag>Flag Mark!
| coordinates = 300,400;30,300>creature>Special Mark!;100,80;200,100>>Flag Mark!
| marker-type = creature
| marker-type = creature
| marker-label = Hunting Mark
| marker-label = Hunting Mark
| no-caption = y
}}
}}


[[Category:Image templates]]</noinclude>
[[Category:Image templates]]</noinclude>

Latest revision as of 14:53, 14 September 2018

Description

Displays a map with optional flags which can be marked onto it, using in-game coordinates.

{{Search map
| <unnamed param1>
| coordinates = 
| title = 
| image = 
| size = 
| marker-type = 
| marker-label = 
| marker-size = 
| css-float = 
}}

Parameters

unnamed param 1
The pagename from which to pull the map through property Has map image. Defaults to {{PAGENAME}}.
coordinates
The coordinates to mark on the map. It uses the following form separated by semi-colons: <x,y,z>><type>><label>.
Example: 12.5,7.4>>Cool label
title
Optional. The search map title. Defaults to "Search map".
image
Optional. A plain image to be used as map. Overrides unnamed param 1.
size
Optional. The map size. Accepts either medium or big. Defaults to small.
marker-type
Optional. The marker type to be used as default for all markers. Accepts: flag (default), creature, fate, quest, fishing-node, spearing-node, logging-node, harvesting-node, mining-node, quarrying-node. (to be continued)
marker-label
Optional. The marker label to be used as default for all markers.
marker-size
Optional. The marker icon size to be used as default for all markers. Defaults to 20px.
css-float
Optional. Used to make the map float either right or left.

Examples

{{Search map
| image = Ruby Sea HQ Map.jpg
}}
Search map
Ruby Sea HQ Map.jpg
{{Search map
| image = Yanxia HQ Map.jpg
| size = big
| coordinates = 28,11;26,10;23,11;21,9;17,13;18,16;12,30;17,34
}}
Search map
Yanxia HQ Map.jpg
Flag marker.png
Flag marker.png
Flag marker.png
Flag marker.png
Flag marker.png
Flag marker.png
Flag marker.png
Flag marker.png
{{Search map
| image = Ruby Sea HQ Map.jpg
| title = White Joker Locations
| coordinates = 300,400;30,300>creature>Special Mark!;100,80;200,100>>Flag Mark!
| marker-type = creature
| marker-label = Hunting Mark
}}
White Joker Locations
Ruby Sea HQ Map.jpg
Flag marker.png
Aggressive difficulty r4.png
Flag marker.png
Flag marker.png