Difference between revisions of "Widget:Map Fort1"

From UnderWiki
Jump to navigation Jump to search
Line 23: Line 23:
 
</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;">
 
</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" width="1024" height="1024" style="width:<!--{$width|escape:'html'|default:'1024'}-->px;height:<!--{$width|escape:'html'|default:'1024'}-->px;" usemap="#fort1_map<!--{$seed|escape:'html'|default:'1'}-->">
 
<map name="fort1_map<!--{$seed|escape:'html'|default:'1'}-->">
 
<map name="fort1_map<!--{$seed|escape:'html'|default:'1'}-->">
 
   <area shape="poly" coords="278,505,369,501,380,513,391,515,390,550,416,573,482,597,536,605,553,622,589,621,589,638,552,639,552,649,532,661,488,641,449,641,371,607,342,574,376,551,376,533,346,533,347,561,327,562,318,572,299,572,289,565,289,544,278,562" onMouseOver="document.getElementById('base_sel<!--{$seed|escape:'html'|default:'1'}-->').src='http://underwiki.com/images/b/ba/Fort1_bickford_sel.png';" onMouseOut="document.getElementById('base_sel<!--{$seed|escape:'html'|default:'1'}-->').src='http://underwiki.com/images/4/48/Trans.png';" href="http://underwiki.com/wiki/Bickford" alt="Bickford">
 
   <area shape="poly" coords="278,505,369,501,380,513,391,515,390,550,416,573,482,597,536,605,553,622,589,621,589,638,552,639,552,649,532,661,488,641,449,641,371,607,342,574,376,551,376,533,346,533,347,561,327,562,318,572,299,572,289,565,289,544,278,562" onMouseOver="document.getElementById('base_sel<!--{$seed|escape:'html'|default:'1'}-->').src='http://underwiki.com/images/b/ba/Fort1_bickford_sel.png';" onMouseOut="document.getElementById('base_sel<!--{$seed|escape:'html'|default:'1'}-->').src='http://underwiki.com/images/4/48/Trans.png';" href="http://underwiki.com/wiki/Bickford" alt="Bickford">

Revision as of 03:07, 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'.