Template:Location map many: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Wikid77
(expanded with 6 more markers #4-#9)
meta>Wikid77
(completed code for marker #9; noted 9 markers (so far) allowed)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
-- Template for image with markers/labels (see bottom NOTES)
-- Template for image with markers/labels (see bottom "NOTES")
-->
-->
<includeonly><div style="width: {{#expr: {{{width|240}}} + 2 }}px; {{#if: {{{caption|}}}  
<includeonly><div style="width: {{#expr: {{{width|240}}} + 2 }}px; {{#if: {{{caption|}}}  
Line 337: Line 337:
}}</div><!--end-div point#8--
}}</div><!--end-div point#8--
================================================= Marker/Label #9
================================================= Marker/Label #9
--><div style="position: absolute; z-index: 2; top: {{#expr:
--><div style="position: relative; text-align: center; {{#if: {{{mark9size|}}}  
  100 * ({{Location map {{{1}}}|top}} - {{#if: {{{lat3_deg|}}}
   | left: -{{#expr: {{{mark9size}}} / 2 round 0 }}px; top: -{{#expr: {{{mark9size}}} / 2 round 0 }}px; width: {{{mark9size}}}px; font-size: {{{mark9size}}}px;  
    | {{#expr: {{#ifeq: {{{lat3_dir|}}}|S|-1|1}} * ({{{lat3_deg|0}}} + ({{{lat3_min|0}}} / 60) + ({{{lat3_sec|0}}} / 3600)) }}
   | left: -{{#expr: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}} / 2 round 0 }}px; top: -{{#expr: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}} / 2 round 0 }}px; width: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}}px; font-size: {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}}px;  
    | {{{lat3|0}}}
}}"><!-- specify marker#9 -->[[Image:{{#if: {{{mark9|}}}  
  }}) / ({{Location map {{{1}}}|top}} - {{Location map {{{1}}}|bottom}}) round 1
   | {{{mark9}}}  
}}%; left: {{#expr:
   | {{#if: {{Location map {{{1}}}|mark9}}|{{Location map {{{1}}}|mark9}}|Red pog.svg}}
  {{#expr:{{#if:{{Location map {{{1}}}|crosses180}}|{{#ifeq: {{{lon3_dir|}}}|W|-36000/({{Location map {{{1}}}|left}}-{{Location map {{{1}}}|right}})|}}|}}}} + 100 * ({{#if: {{{lon3_deg|}}}
}}|{{#if: {{{mark9size|}}}  
    | {{#expr: {{#ifeq: {{{lon3_dir|}}}|W|-1|1}} * ({{{lon3_deg|0}}} + ({{{lon3_min|0}}} / 60) + ({{{lon3_sec|0}}} / 3600)) }}
   | {{{mark9size}}}x{{{mark9size}}}  
    | {{{long3|0}}}
   | {{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}}x{{#if: {{Location map {{{1}}}|mark9size}}|{{Location map {{{1}}}|mark9size}}|8}}
  }} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1
}}px|{{#if: {{{label9|}}}  
}}%; height: 0; width: 0; margin: 0; padding: 0;"><!--
   | {{{label9}}}  
----------------------------------------------- Marker#3 division
--><div style="position: relative; text-align: center; {{#if: {{{mark3size|}}}  
   | left: -{{#expr: {{{mark3size}}} / 2 round 0 }}px; top: -{{#expr: {{{mark3size}}} / 2 round 0 }}px; width: {{{mark3size}}}px; font-size: {{{mark3size}}}px;  
   | left: -{{#expr: {{#if: {{Location map {{{1}}}|mark3size}}|{{Location map {{{1}}}|mark3size}}|8}} / 2 round 0 }}px; top: -{{#expr: {{#if: {{Location map {{{1}}}|mark3size}}|{{Location map {{{1}}}|mark3size}}|8}} / 2 round 0 }}px; width: {{#if: {{Location map {{{1}}}|mark3size}}|{{Location map {{{1}}}|mark3size}}|8}}px; font-size: {{#if: {{Location map {{{1}}}|mark3size}}|{{Location map {{{1}}}|mark3size}}|8}}px;  
}}"><!-- specify marker#3 -->[[Image:{{#if: {{{mark3|}}}  
   | {{{mark3}}}  
   | {{#if: {{Location map {{{1}}}|mark3}}|{{Location map {{{1}}}|mark3}}|Red pog.svg}}
}}|{{#if: {{{mark3size|}}}  
   | {{{mark3size}}}x{{{mark3size}}}  
   | {{#if: {{Location map {{{1}}}|mark3size}}|{{Location map {{{1}}}|mark3size}}|8}}x{{#if: {{Location map {{{1}}}|mark3size}}|{{Location map {{{1}}}|mark3size}}|8}}
}}px|{{#if: {{{label3|}}}  
   | {{{label3}}}  
   | {{PAGENAME}}  
   | {{PAGENAME}}  
}}]]</div><!-- end-div marker3
}}]]</div><!-- end-div marker9
---------------------------------------------- Label #9
-------------------------------------------------- Label #9
-->{{#ifeq: {{{position3|}}} | none  
-->{{#ifeq: {{{position9|}}} | none  
   |
   |
   |<div style="font-size: {{{label3_size|90}}}%; line-height: 110%; position: relative; top: -1.5em; width: 6em; {{#switch: {{{position3}}}
   |<div style="font-size: {{{label9_size|90}}}%; line-height: 110%; position: relative; top: -1.5em; width: 6em; {{#switch: {{{position9}}}
     |left = left: -6.5em; text-align: right;
     |left = left: -6.5em; text-align: right;
     |right = left: 0.5em; text-align: left;
     |right = left: 0.5em; text-align: left;
     |top = top:-2.65em; left:-3em; text-align: center;
     |top = top:-2.65em; left:-3em; text-align: center;
     |bottom = top:-0.15em; left: -3em; text-align: center;
     |bottom = top:-0.15em; left: -3em; text-align: center;
     |left: 0.5em; text-align: left;
     |left: 0.5em; text-align: left;<!-- default -->
   }}"><span style="padding: 1px; {{#if: {{{background3|}}}  
   }}"><span style="padding: 1px; {{#if: {{{background9|}}}  
     | background-color: {{{background3}}};
     | background-color: {{{background9}}};
   }}">{{{label3|}}}</span></div><!-- end-div label3 -->
   }}">{{{label9|}}}</span></div><!-- end-div label9 -->
}}</div><!--end-div point#3 -->
}}</div><!--end-div point#9--
--------------------------------------------------------- -->
</div><!-- end-div whole map? -->
</div><!-- end-div whole map? -->
</div></div></div><!--force any divisions closed -->
<!-- </div></div></div><!--force any divisions closed -->
</includeonly><noinclude><!--
</includeonly><noinclude><!--
--
--
Line 382: Line 371:
--  This code generates an HTML division to show the map image,
--  This code generates an HTML division to show the map image,
--  overlayed with a marker-image division & label division,
--  overlayed with a marker-image division & label division,
--  for each pair of the marker/label points.
--  for each pair of up to 9 marker/label points.
--
--
--  The "map image" can be any image, allowing markers/labels
--  The "map image" can be any image, allowing markers/labels

Revision as of 09:35, 8 September 2007