Difference between revisions of "Widget:Map PoI Aelita"

From UnderWiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
=== Parameters ===
 
=== Parameters ===
 
; width : Width of the map pane, in pixels.  Default is 1024 pixels.
 
; width : Width of the map pane, in pixels.  Default is 1024 pixels.
; poiy : Horizontal coordinate of the marker (to the left of the icon, based on 1024px width).
+
; 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).
 
; poiy : Vertical coordinate of the marker (to the top of the icon, based on 1024px height).
 
; poiname : Title to display on mouseover.
 
; poiname : Title to display on mouseover.
Line 13: Line 13:
 
[[Category:Widgets]]
 
[[Category:Widgets]]
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<div id="poiaelita<!--{$seed|escape:'html'|default:'1'}-->" style="position: relative;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/d/d3/PoI_Aelita.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="poiaelita<!--{$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/d/d3/PoI_Aelita.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 08:06, 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'.