Difference between revisions of "Widget:Map PoI Faction"

From UnderWiki
Jump to navigation Jump to search
(Created page with "<noinclude> This widget inserts a point of interest. === Parameters === ; width : Width of the map pane, in pixels. Default is 1024 pixels. ; poix : Horizontal coordinate of...")
 
 
Line 13: Line 13:
 
[[Category:Widgets]]
 
[[Category:Widgets]]
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<div id="poifaction<!--{$seed|escape:'html'|default:'1'}-->" style="position: absolute;width:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * 100px);height:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * 100px);left:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * <!--{$poix|escape:'html'|default:'0'}-->px);top:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * <!--{$poiy|escape:'html'|default:'0'}-->px);display:flex;background-size:cover;background-image: url('http://underwiki.com/images/9/96/PoI_Faction.png');<!--{if isset($poilink)}-->cursor: pointer;<!--{/if}-->z-index:5<!--{$seed|escape:'html'|default:'1'}-->" <!--{if isset($poiname)}-->title="<!--{$poiname|escape:'html'}-->"<!--{/if}--> <!--{if isset($poilink)}-->onclick="location.href='http://underwiki.com/index.php?search=<!--{$poilink|escape:'html'}-->';"<!--{/if}-->>&nbsp;</div>
+
<div id="poifaction<!--{$seed|escape:'html'|default:'1'}-->" style="position: absolute;width:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * 100px);height:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * 100px);left:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * <!--{$poix|escape:'html'|default:'0'}-->px);top:calc((<!--{$width|escape:'html'|default:'1024'}--> / 1024) * <!--{$poiy|escape:'html'|default:'0'}-->px);display:flex;background-size:cover;background-image: url('https://underwiki.com/images/9/96/PoI_Faction.png');<!--{if isset($poilink)}-->cursor: pointer;<!--{/if}-->z-index:5<!--{$seed|escape:'html'|default:'1'}-->" <!--{if isset($poiname)}-->title="<!--{$poiname|escape:'html'}-->"<!--{/if}--> <!--{if isset($poilink)}-->onclick="location.href='https://underwiki.com/index.php?search=<!--{$poilink|escape:'html'}-->';"<!--{/if}-->>&nbsp;</div>
 
</includeonly>
 
</includeonly>

Latest revision as of 09:07, 8 April 2019

This widget inserts a point of interest.

Parameters

width
Width of the map pane, in pixels. Default is 1024 pixels.
poix
Horizontal coordinate of the marker (to the left of the icon, based on 1024px width).
poiy
Vertical coordinate of the marker (to the top of the icon, based on 1024px height).
poiname
Title to display on mouseover.
poilink
Topic name to link to.

Special Parameters

seed
If more than one PoI is included on a page, you can override this value to control the layers separately in each. The default seed value is '0'.