Difference between revisions of "Widget:Map Fort1"
Jump to navigation
Jump to search
Line 21: | Line 21: | ||
; seed : If a map is included more than once, you can override this value so it doesn't break the imagemap and layer display options in each. The default seed value is '0'. | ; seed : If a map is included more than once, you can override this value so it doesn't break the imagemap and layer display options in each. The default seed value is '0'. | ||
[[Category:Widgets]] | [[Category:Widgets]] | ||
− | </noinclude><includeonly><script src=" | + | </noinclude><includeonly><script><!-- ;(function(a){a.fn.rwdImageMaps=function(){var c=this;var b=function(){c.each(function(){if(typeof(a(this).attr("usemap"))=="undefined"){return}var e=this,d=a(e);a("<img />").on('load',function(){var g="width",m="height",n=d.attr(g),j=d.attr(m);if(!n||!j){var o=new Image();o.src=d.attr("src");if(!n){n=o.width}if(!j){j=o.height}}var f=d.width()/100,k=d.height()/100,i=d.attr("usemap").replace("#",""),l="coords";a('map[name="'+i+'"]').find("area").each(function(){var r=a(this);if(!r.data(l)){r.data(l,r.attr(l))}var q=r.data(l).split(","),p=new Array(q.length);for(var h=0;h<p.length;++h){if(h%2===0){p[h]=parseInt(((q[h]/n)*100)*f)}else{p[h]=parseInt(((q[h]/j)*100)*k)}}r.attr(l,p.toString())})}).attr("src",d.attr("src"))})};a(window).resize(b).trigger("resize");return this}})(jQuery); --></script><div style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;position:relative;"> |
<div id="imagemap<!--{$seed|escape:'html'|default:'1'}-->" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;position:absolute;top:0;left:0;<!--{if isset($imagemap)}-->display:flex;z-index:99;<!--{else}-->display:none;<!--{/if}-->"> | <div id="imagemap<!--{$seed|escape:'html'|default:'1'}-->" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;position:absolute;top:0;left:0;<!--{if isset($imagemap)}-->display:flex;z-index:99;<!--{else}-->display:none;<!--{/if}-->"> | ||
<img id="base_sel<!--{$seed|escape:'html'|default:'1'}-->" src="http://underwiki.com/images/4/48/Trans.png" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;" usemap="#fort1_map<!--{$seed|escape:'html'|default:'1'}-->"> | <img id="base_sel<!--{$seed|escape:'html'|default:'1'}-->" src="http://underwiki.com/images/4/48/Trans.png" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;" usemap="#fort1_map<!--{$seed|escape:'html'|default:'1'}-->"> | ||
Line 45: | Line 45: | ||
<div id="webway<!--{$seed|escape:'html'|default:'1'}-->" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;position:absolute;top:0;left:0;z-index:2;background-image: url('http://underwiki.com/images/5/5b/Fort1_webway_mo.png');<!--{if isset($webway)}-->display:flex;background-size:cover;<!--{else}-->display:none;<!--{/if}-->"> </div> | <div id="webway<!--{$seed|escape:'html'|default:'1'}-->" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;position:absolute;top:0;left:0;z-index:2;background-image: url('http://underwiki.com/images/5/5b/Fort1_webway_mo.png');<!--{if isset($webway)}-->display:flex;background-size:cover;<!--{else}-->display:none;<!--{/if}-->"> </div> | ||
<div id="base<!--{$seed|escape:'html'|default:'1'}-->" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;position:absolute;top:0;left:0;z-index:1;background-image: url('http://underwiki.com/images/7/75/Fort1_base.png');<!--{if isset($base)}-->display:none;<!--{else}-->display:flex;background-size:cover;<!--{/if}-->"> </div> | <div id="base<!--{$seed|escape:'html'|default:'1'}-->" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;position:absolute;top:0;left:0;z-index:1;background-image: url('http://underwiki.com/images/7/75/Fort1_base.png');<!--{if isset($base)}-->display:none;<!--{else}-->display:flex;background-size:cover;<!--{/if}-->"> </div> | ||
− | </div><script><!-- $(' | + | </div><script><!-- $('img[usemap]').rwdImageMaps(); --></script></includeonly> |
Revision as of 03:06, 29 January 2019
This widget inserts a map of Tyball's Folly (Fort1).
Parameters
- width
- Width of the map pane, in pixels. Default is 1024 pixels.
- imagemap
- If set, displays the imagemap of all locations which highlight in blue when moused over. By default, this is hidden. (Note: only works at full size, currently.)
Layer options:
- base
- If set, excludes the base map. By default, this is included. (Generally, this should be included.)
- bickford
- If set, highlights this area in gold. By default, this is hidden.
- furies
- If set, highlights this area in gold. By default, this is hidden.
- futuresend
- If set, highlights this area in gold. By default, this is hidden.
- malom
- If set, highlights this area in gold. By default, this is hidden.
- necro
- If set, highlights this area in gold. By default, this is hidden.
- regret
- If set, highlights this area in gold. By default, this is hidden.
- riders
- If set, highlights this area in gold. By default, this is hidden.
- sanctum
- If set, highlights this area in gold. By default, this is hidden.
- webway
- If set, highlights this area in gold. By default, this is hidden.
Special options:
- seed
- If a map is included more than once, you can override this value so it doesn't break the imagemap and layer display options in each. The default seed value is '0'.