|
|
| Line 1: |
Line 1: |
| <includeonly> | | <includeonly>{{location map+ |
| <div style="{{#if: {{{caption|}}}
| | | {{{1|World}}} |
| | width:{{#expr:{{#if:{{{width|}}}|{{{width}}}|240}} + 2 }}px; padding: 3px;{{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC }};}} margin: 3px;
| | | border = {{{border|}}} |
| | width:{{#if:{{{width|}}}|{{{width}}}|240}}px;}}<!--
| | | alt = {{{alt|}}} |
| -->float:{{#switch:{{{float|}}}|"center"|center=none|"left"|left=left|"right"|right=right|"none"|none=none|right}};<!--
| | | caption_undefined = {{#ifeq: {{{caption|+}}} | {{{caption|-}}} || defined }} |
| -->clear:{{#switch:{{{float|}}}|"center"|center=both; margin-left: auto; margin-right: auto|"left"|left=left|"right"|right=right|"none"|none=none|right}};<!--
| | | caption = {{{caption|}}} |
| -->{{#if: {{{caption|}}} | background:#F9F9F9; }}">
| | | label = {{{label|}}} |
| <div style="position: relative;{{#if: {{{caption|}}}
| | | float = {{{float|}}} |
| | {{#ifeq: {{{border|}}} | none || border: 1px solid {{#if: {{{border|}}} | {{{border}}} | #CCC}};}}}}<!--
| | | width = {{{width|}}} |
| -->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 /><!--
| | | relief= {{{relief|}}} |
| | | AlternativeMap = {{{AlternativeMap|}}} |
| | | overlay_image = {{{overlay_image|}}} |
| | | places = {{Location map~ |
| | | {{{1|World}}} |
| | | label = {{{label|}}} |
| | | label_size = {{{label_size|}}} |
| | | label_width = {{{label_width|}}} |
| | | mark = {{#ifexist:media:{{{mark}}}|{{{mark}}}|Red pog.png}} <!-- I'd rather not user this, but its needed to work around some typos--> |
| | | marksize = {{{marksize|}}} |
| | | alt = {{{alt|}}} |
| | | position = {{{position|}}} |
| | | background = {{{background|}}} |
| | | link = {{{link|}}} |
| | | lat_dir = {{{lat_dir|}}} |
| | | lat_deg = {{{lat_deg|}}} |
| | | lat_min = {{{lat_min|}}} |
| | | lat_sec = {{{lat_sec|}}} |
| | | lon_deg = {{{lon_deg|}}} |
| | | lon_min = {{{lon_min|}}} |
| | | lon_sec = {{{lon_sec|}}} |
| | | lon_dir = {{{lon_dir|}}} |
| | | lat = {{{lat|}}} |
| | | long = {{{long|}}} |
| | }} |
| | }}</includeonly><noinclude> |
|
| |
|
| --Start marker
| | {{Template:Location map/doc}} |
| -->{{Location map/marker
| |
| | top = {{#expr:{{#if:{{Location map {{{1}}}|y}}|
| |
| {{Location map {{{1}}}|y|{{Location map/decdeg
| |
| |dec = {{{lat|}}}
| |
| |deg = {{{lat_deg|}}}
| |
| |min = {{{lat_min|}}}
| |
| |sec = {{{lat_sec|}}}
| |
| |hem = {{{lat_dir|}}}}}|{{Location map/decdeg
| |
| |dec = {{{long|}}}
| |
| |deg = {{{lon_deg|}}}
| |
| |min = {{{lon_min|}}}
| |
| |sec = {{{lon_sec|}}}
| |
| |hem = {{{lon_dir|}}}}}}}|100 * ({{Location map {{{1}}}|top}} - {{Location map/decdeg
| |
| |dec = {{{lat|}}}
| |
| |deg = {{{lat_deg|}}}
| |
| |min = {{{lat_min|}}}
| |
| |sec = {{{lat_sec|}}}
| |
| |hem = {{{lat_dir|}}}}}) / ({{Location map {{{1}}}|top}} - {{Location map {{{1}}}|bottom}}) round 1
| |
| }}}}
| |
| | left = {{#expr:{{#if:{{Location map {{{1}}}|x}}
| |
| |{{Location map {{{1}}}|x|{{Location map/decdeg
| |
| |dec = {{{lat|}}}
| |
| |deg = {{{lat_deg|}}}
| |
| |min = {{{lat_min|}}}
| |
| |sec = {{{lat_sec|}}}
| |
| |hem = {{{lat_dir|}}}}}|{{Location map/decdeg
| |
| |dec = {{{long|}}}
| |
| |deg = {{{lon_deg|}}}
| |
| |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.png<!--
| |
| -->}}<!--
| |
| -->}}
| |
| |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>
| |
| | |
| ==Usage==
| |
| <pre>
| |
| {|
| |
| {{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)
| |
| }}
| |
| |}
| |
| </pre>
| |
|
| |
|
| [[Category:Location map| ]]</noinclude> | | [[Category:Location map| ]]</noinclude> |
This template generates a location map as a composite image consisting of a map and a location mark. Optionally a label and caption can be added.
Note: The template was copied whole from Wikipedia:Template:Location map, while we don't use all of its functionality, it was left intact to ease the process of future integration.
Basic Usage
Simple syntax versions
{{Location map| RegionName | long=XX |lat=YY }}
{{Location map| RegionName | long=XX |lat=YY | label= LocationName }}
Additional Options
| Additional Map display parameters
|
| Parameter
|
Description
|
width
|
Determines the width of the map in pixels. The default is 350. Do not include px, for example: width=300, not width=300px.
|
caption
|
The text of a caption to be displayed below the map. Specifying a caption will cause the map to be displayed with a frame. If caption is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If caption is not defined, the map will not be framed and a default caption will be generated. The default caption is created from the label parameter (or the current page name if label not defined) and the name parameter from map definition template. See the examples below.
|
alt
|
Alt text for map; shown on mouse hover.
|
position
|
The position of the label relative to the mark. Valid values are left, right, top and bottom. The default is right.
|
mark
|
The name of an image to display as the mark. The default is Red pog.png ( ). See examples at Category:Location markers.
|
link
|
Specifies a wiki link which will be followed if the reader clicks on the mark. The name of the linked article is displayed when the mouse pointer hovers over the mark.
|
Empty template with all the options
{{Location map
| {{{1}}}
| width =
| caption =
| alt =
| label =
| label_size =
| position =
| mark =
| marksize =
| link =
| lat_deg =
| lon_deg =
}}
References
This page uses content from the English Wikipedia. The original content was at Template:Location map. The list of authors can be seen in the page history of Template:Location map. As with A Wiki of Ice and Fire, the content of Wikipedia is available under the Creative Commons Attribution-ShareAlike License.