Difference between revisions of "Template: Location map"
From A Wiki of Ice and Fire
m |
m (sigh...) |
||
Line 1: | Line 1: | ||
− | <includeonly><div style="{{#if: {{{caption|}}} | + | <includeonly> |
− | + | <div style="{{#if: {{{caption|}}} | |
− | + | | width:{{#expr:{{#if:{{{width|}}}|{{{width}}}|240}} + 2 }}px; padding: 3px;{{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC }};}} margin: 3px; | |
− | }} 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|}}} | + | | width:{{#if:{{{width|}}}|{{{width}}}|240}}px;}}<!-- |
− | + | -->float:{{#switch:{{{float|}}}|"center"|center=none|"left"|left=left|"right"|right=right|"none"|none=none|right}};<!-- | |
− | }} 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 | + | -->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|}}} | ||
+ | | {{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC}};}}}}<!-- | ||
+ | -->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 | ||
| top = {{#expr:{{#if:{{Location map {{{1}}}|y}}| | | top = {{#expr:{{#if:{{Location map {{{1}}}|y}}| | ||
{{Location map {{{1}}}|y|{{Location map/decdeg | {{Location map {{{1}}}|y|{{Location map/decdeg | ||
− | |dec = {{{lat|}}} | + | |dec = {{{lat|}}} |
− | |deg = {{{lat_deg|}}} | + | |deg = {{{lat_deg|}}} |
− | |min = {{{lat_min|}}} | + | |min = {{{lat_min|}}} |
− | |sec = {{{lat_sec|}}} | + | |sec = {{{lat_sec|}}} |
− | |hem = {{{lat_dir|}}}}}|{{Location map/decdeg | + | |hem = {{{lat_dir|}}}}}|{{Location map/decdeg |
− | |dec = {{{long|}}} | + | |dec = {{{long|}}} |
− | |deg = {{{lon_deg|}}} | + | |deg = {{{lon_deg|}}} |
− | |min = {{{lon_min|}}} | + | |min = {{{lon_min|}}} |
− | |sec = {{{lon_sec|}}} | + | |sec = {{{lon_sec|}}} |
− | |hem = {{{lon_dir|}}}}}}}|100 * ({{Location map {{{1}}}|top}} - {{Location map/decdeg | + | |hem = {{{lon_dir|}}}}}}}|100 * ({{Location map {{{1}}}|top}} - {{Location map/decdeg |
− | |dec = {{{lat|}}} | + | |dec = {{{lat|}}} |
− | |deg = {{{lat_deg|}}} | + | |deg = {{{lat_deg|}}} |
− | |min = {{{lat_min|}}} | + | |min = {{{lat_min|}}} |
− | |sec = {{{lat_sec|}}} | + | |sec = {{{lat_sec|}}} |
− | |hem = {{{lat_dir|}}}}}) / ({{Location map {{{1}}}|top}} - {{Location map {{{1}}}|bottom}}) round 1 | + | |hem = {{{lat_dir|}}}}}) / ({{Location map {{{1}}}|top}} - {{Location map {{{1}}}|bottom}}) round 1 |
}}}} | }}}} | ||
| left = {{#expr:{{#if:{{Location map {{{1}}}|x}} | | left = {{#expr:{{#if:{{Location map {{{1}}}|x}} | ||
|{{Location map {{{1}}}|x|{{Location map/decdeg | |{{Location map {{{1}}}|x|{{Location map/decdeg | ||
− | |dec = {{{lat|}}} | + | |dec = {{{lat|}}} |
− | |deg = {{{lat_deg|}}} | + | |deg = {{{lat_deg|}}} |
− | |min = {{{lat_min|}}} | + | |min = {{{lat_min|}}} |
− | |sec = {{{lat_sec|}}} | + | |sec = {{{lat_sec|}}} |
− | |hem = {{{lat_dir|}}}}}|{{Location map/decdeg | + | |hem = {{{lat_dir|}}}}}|{{Location map/decdeg |
− | |dec = {{{long|}}} | + | |dec = {{{long|}}} |
− | |deg = {{{lon_deg|}}} | + | |deg = {{{lon_deg|}}} |
− | |min = {{{lon_min|}}} | + | |min = {{{lon_min|}}} |
− | |sec = {{{lon_sec|}}} | + | |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 | + | |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|}}} | + | |dec = {{{long|}}} |
− | |deg = {{{lon_deg|}}} | + | |deg = {{{lon_deg|}}} |
− | |min = {{{lon_min|}}} | + | |min = {{{lon_min|}}} |
− | |sec = {{{lon_sec|}}} | + | |sec = {{{lon_sec|}}} |
− | |hem = {{{lon_dir|}}}}} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1 | + | |hem = {{{lon_dir|}}}}} - {{Location map {{{1}}}|left}}) / ({{Location map {{{1}}}|right}} - {{Location map {{{1}}}|left}}) round 1 |
}}}} | }}}} | ||
|marksize = {{#if:{{{marksize|}}}<!-- | |marksize = {{#if:{{{marksize|}}}<!-- |
Revision as of 09:06, 18 May 2012
Usage
{| {{Location map | File:Map.PNG Is the relevant Map from the "Available maps" list bellow (for example File:The_North.png) | label = The label shown near the location you mark on the map | label_size = label size (try 92) | lat = X coordinate of the location[-90..90] (you'll have to play battleship with this, until you'll get it right) | long = Y coordinate of the location[-180..180] (you'll have to play battleship with this, until you'll get it right) | position = "right" or "left" - on which side of the marker to add the label. | mark = image used as marker -e.g "filename.png" | marksize = size in? | width = Map width. (usually from 300 to 400) | float = "right" or "left" - where the map would be located (usually right) | caption = Text caption show below the map, write here it's description. | alt = Text to shown if image doesnt load or when mouse hover over it (make it same as caption) }} |}