Template:Location map: Difference between revisions

Jump to navigation Jump to search
imported>Bearcat
(yesterday's change requires revision before going live; it caused a large number of location maps to inappropriately realign left instead of right.)
imported>Thumperward
(re-syncing with sandbox. bug has been found and corrected. if there are any further problems let me know and I'll fix them ASAP. thanks!)
Line 1: Line 1:
<includeonly><div style="{{#if: {{{caption|}}}
<includeonly>{{location map+
  | width:{{#expr:{{#if:{{{width|}}}|{{{width}}}|240}} + 2 }}px; padding: 3px;{{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC }};}} margin: 3px;
| {{{1|World}}}
  | width:{{#if:{{{width|}}}|{{{width}}}|240}}px;
| border = {{{border|}}}
}} float:{{#switch:{{{float|}}}|"center"|center=none|"left"|left=left|"right"|right=right|"none"|none=none|right}}; clear:{{#switch:{{{float|}}}|"center"|center=both; margin-left: auto; margin-right: auto|"left"|left=left|"right"|right=right|"none"|none=none|right}};{{#if: {{{caption|}}} | background:#F9F9F9; }}"><div style="position: relative;{{#if: {{{caption|}}}
| alt = {{{alt|}}}
  | {{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC}};}}
| caption_undefined = {{#ifeq: {{{caption|+}}} | {{{caption|-}}} || defined }}
}} padding: 0px; width:{{#if:{{{width|}}}|{{{width}}}|240}}px">[[File:{{#if: {{{AlternativeMap|}}}|{{{AlternativeMap}}} |{{#if: {{{relief|}}}|{{#if: {{Location map {{{1}}}|image1}}|{{Location map {{{1}}}|image1}}|{{Location map {{{1|}}}|image}} }}|{{Location map {{{1|}}}|image}} }} }}|{{#if:{{{width|}}}|{{{width}}}|240}}px|{{#if:{{{alt|}}}|{{{alt}}}|{{#if:{{{label|}}}|{{{label}}}|{{PAGENAME}}}} is located in {{Location map {{{1}}}|name}}}}]]<br /><!-- Start marker -->{{Location map/marker
| caption = {{{caption|}}}
| top    = {{#expr:{{#if:{{Location map {{{1}}}|y}}|
| label = {{{label|}}}
{{Location map {{{1}}}|y|{{Location map/decdeg
| float = {{{float|}}}
|dec = {{{lat|}}}
| width = {{{width|}}}
|deg = {{{lat_deg|}}}
| AlternativeMap = {{{AlternativeMap|}}}
|min = {{{lat_min|}}}
| overlay_image = {{{overlay_image|}}}
|sec = {{{lat_sec|}}}
| places = {{Location map~
|hem = {{{lat_dir|}}}}}|{{Location map/decdeg
  | {{{1|World}}}
|dec = {{{long|}}}
  | label = {{{label|}}}
|deg = {{{lon_deg|}}}
  | label_size = {{{label_size|}}}
|min = {{{lon_min|}}}
  | mark = {{{mark|}}}
|sec = {{{lon_sec|}}}
  | marksize = {{{marksize|}}}
|hem = {{{lon_dir|}}}}}}}|100 * ({{Location map {{{1}}}|top}} - {{Location map/decdeg
  | alt = {{{alt}}}
|dec = {{{lat|}}}
  | position = {{{position|}}}
|deg = {{{lat_deg|}}}
  | background = {{{background|}}}
|min = {{{lat_min|}}}
  | link = {{{link|}}}
|sec = {{{lat_sec|}}}
  | lat_dir = {{{lat_dir|}}}
|hem = {{{lat_dir|}}}}}) / ({{Location map {{{1}}}|top}} - {{Location map {{{1}}}|bottom}}) round 1
  | lat_deg = {{{lat_deg|}}}
}}}}
  | lat_min = {{{lat_min|}}}
| left    = {{#expr:{{#if:{{Location map {{{1}}}|x}}
  | lat_sec = {{{lat_sec|}}}
|{{Location map {{{1}}}|x|{{Location map/decdeg
  | lon_deg = {{{lon_deg|}}}
|dec = {{{lat|}}}
  | lon_min = {{{lon_min|}}}
|deg = {{{lat_deg|}}}
  | lon_sec = {{{lon_sec|}}}
|min = {{{lat_min|}}}
  | lon_dir = {{{lon_dir|}}}
|sec = {{{lat_sec|}}}
   | lat = {{{lat|}}}
|hem = {{{lat_dir|}}}}}|{{Location map/decdeg
   | long = {{{long|}}}
|dec = {{{long|}}}
   }}
|deg = {{{lon_deg|}}}
}}</includeonly><noinclude>{{documentation}}</noinclude>
|min = {{{lon_min|}}}
|sec = {{{lon_sec|}}}
|hem = {{{lon_dir|}}}}}}}|{{#expr:{{#if:{{Location map {{{1}}}|crosses180}}|{{#ifeq: {{{lon_dir|}}}|W|-36000/({{Location map {{{1}}}|left}}-{{Location map {{{1}}}|right}})|}}|}}}} + 100 * ({{Location map/decdeg
|dec = {{{long|}}}
|deg = {{{lon_deg|}}}
|min = {{{lon_min|}}}
|sec = {{{lon_sec|}}}
|hem = {{{lon_dir|}}}}} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1
}}}}
|marksize   = {{#if:{{{marksize|}}}<!--
  -->|{{{marksize}}}<!--
  -->|{{#if:{{Location map {{{1}}}|marksize}}<!--
      -->|{{Location map {{{1}}}|marksize}}<!--
      -->|8<!--
  -->}}<!--
-->}}
|mark      = {{#ifexist:media:{{{mark}}}<!--
  -->|{{{mark}}}<!--
  -->|{{#ifexist:media:{{Location map {{{1}}}|mark}}<!--
      -->|{{Location map {{{1}}}|mark}}<!--
      -->|Red pog.svg<!--
  -->}}<!--
-->}}
|z-index    = 2
|position   = {{{position|}}}
|label_size = {{#if:{{{label_size|}}}|{{{label_size}}}|90}}
|background = {{{background|}}}
|label      = {{{label|}}}
}}<!-- End marker --></div><div style="font-size: 90%">{{{caption|{{#if: {{{label|}}}
  | {{{label}}}
   | {{PAGENAME}}
}} ({{Location map {{{1}}}|name}})}}}</div></div></includeonly><noinclude>
{{documentation}}
</noinclude>

Revision as of 09:27, 23 June 2011