Template:Location map many: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Wikid77
re-added code for marker #2
meta>Wikid77
added 2nd marker/label by systematic subgrouping of original spaghetti code rambling nightmare
Line 17: Line 17:
   | {{{label}}}  
   | {{{label}}}  
   | {{PAGENAME}}  
   | {{PAGENAME}}  
}} ({{Location map {{{1}}}|name}})]]<br /><div style="position: absolute; z-index: 2; top: {{#expr:  
}} ({{Location map {{{1}}}|name}})]]<br /><!--
====================================================== Marker/Label #1
--><div style="position: absolute; z-index: 2; top: {{#expr:  
   100 * ({{Location map {{{1}}}|top}} - {{#if: {{{lat_deg|}}}  
   100 * ({{Location map {{{1}}}|top}} - {{#if: {{{lat_deg|}}}  
     | {{#expr: {{#ifeq: {{{lat_dir|}}}|S|-1|1}} * ({{{lat_deg|0}}} + ({{{lat_min|0}}} / 60) + ({{{lat_sec|0}}} / 3600)) }}  
     | {{#expr: {{#ifeq: {{{lat_dir|}}}|S|-1|1}} * ({{{lat_deg|0}}} + ({{{lat_min|0}}} / 60) + ({{{lat_sec|0}}} / 3600)) }}  
Line 28: Line 30:
   }} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1
   }} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1
}}%; height: 0; width: 0; margin: 0; padding: 0;"><!--
}}%; height: 0; width: 0; margin: 0; padding: 0;"><!--
====================================================== Marker/Label #1
------------------------------------------------------ Marker#1 division
--><div style="position: relative; text-align: center; {{#if: {{{marksize|}}}  
--><div style="position: relative; text-align: center; {{#if: {{{marksize|}}}  
   | left: -{{#expr: {{{marksize}}} / 2 round 0 }}px; top: -{{#expr: {{{marksize}}} / 2 round 0 }}px; width: {{{marksize}}}px; font-size: {{{marksize}}}px;  
   | left: -{{#expr: {{{marksize}}} / 2 round 0 }}px; top: -{{#expr: {{{marksize}}} / 2 round 0 }}px; width: {{{marksize}}}px; font-size: {{{marksize}}}px;  
Line 56: Line 58:
}}<!--
}}<!--
====================================================== Marker/Label #2
====================================================== Marker/Label #2
--><div style="position: absolute; z-index: 2; top: {{#expr:
  100 * ({{Location map {{{1}}}|top}} - {{#if: {{{lat2_deg|}}}
    | {{#expr: {{#ifeq: {{{lat2_dir|}}}|S|-1|1}} * ({{{lat2_deg|0}}} + ({{{lat2_min|0}}} / 60) + ({{{lat2_sec|0}}} / 3600)) }}
    | {{{lat2|0}}}
  }}) / ({{Location map {{{1}}}|top}} - {{Location map {{{1}}}|bottom}}) round 1
}}%; left: {{#expr:
  {{#expr:{{#if:{{Location map {{{1}}}|crosses180}}|{{#ifeq: {{{lon2_dir|}}}|W|-36000/({{Location map {{{1}}}|left}}-{{Location map {{{1}}}|right}})|}}|}}}} + 100 * ({{#if: {{{lon2_deg|}}}
    | {{#expr: {{#ifeq: {{{lon2_dir|}}}|W|-1|1}} * ({{{lon2_deg|0}}} + ({{{lon2_min|0}}} / 60) + ({{{lon2_sec|0}}} / 3600)) }}
    | {{{long2|0}}}
  }} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1
}}%; height: 0; width: 0; margin: 0; padding: 0;"><!--
------------------------------------------------------ Marker#1 division
--><div style="position: relative; text-align: center; {{#if: {{{mark2size|}}}  
--><div style="position: relative; text-align: center; {{#if: {{{mark2size|}}}  
   | left: -{{#expr: {{{mark2size}}} / 2 round 0 }}px; top: -{{#expr: {{{mark2size}}} / 2 round 0 }}px; width: {{{mark2size}}}px; font-size: {{{mark2size}}}px;  
   | left: -{{#expr: {{{mark2size}}} / 2 round 0 }}px; top: -{{#expr: {{{mark2size}}} / 2 round 0 }}px; width: {{{mark2size}}}px; font-size: {{{mark2size}}}px;  

Revision as of 11:58, 6 September 2007