Jump to content

Module:Location map/data/Iraq/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Jackmcbarn (talk | contribs)
update for being a module
Jackmcbarn (talk | contribs)
fix errors
Line 13: Line 13:


== Map definition ==
== Map definition ==
* <tt>'''name''' = {{{{BASEPAGENAME}}|name}}</tt>
* <tt>'''name''' = {{#invoke:Data|main|Location map/data/Iraq|name}}</tt>
*: Name used in the default map caption
*: Name used in the default map caption


* <tt>'''image''' = [[:File:{{{{BASEPAGENAME}}|image}}|{{{{BASEPAGENAME}}|image}}]]</tt>
* <tt>'''image''' = [[:File:{{#invoke:Data|main|Location map/data/Iraq|image}}|{{#invoke:Data|main|Location map/data/Iraq|image}}]]</tt>
*: The default map image, without "Image:" or "File:"
*: The default map image, without "Image:" or "File:"
{{#if:{{{{BASEPAGENAME}}|image1}}|
{{#if:{{#invoke:Data|main|Location map/data/Iraq|image1}}|


* <tt>'''image1''' = [[:File:{{{{BASEPAGENAME}}|image1}}|{{{{BASEPAGENAME}}|image1}}]]</tt>
* <tt>'''image1''' = [[:File:{{#invoke:Data|main|Location map/data/Iraq|image1}}|{{#invoke:Data|main|Location map/data/Iraq|image1}}]]</tt>
*: An alternative map image, usually a relief map, can be displayed via the ''relief'' or ''AlternativeMap'' parameters
*: An alternative map image, usually a relief map, can be displayed via the ''relief'' or ''AlternativeMap'' parameters
}}{{#if:{{{{BASEPAGENAME}}|image2}}|
}}{{#if:{{#invoke:Data|main|Location map/data/Iraq|image2}}|


* <tt>'''image2''' = [[:File:{{{{BASEPAGENAME}}|image2}}|{{{{BASEPAGENAME}}|image2}}]]</tt>
* <tt>'''image2''' = [[:File:{{#invoke:Data|main|Location map/data/Iraq|image2}}|{{#invoke:Data|main|Location map/data/Iraq|image2}}]]</tt>
*: A second alternative map image, can be displayed via the ''AlternativeMap'' parameter only
*: A second alternative map image, can be displayed via the ''AlternativeMap'' parameter only
}}{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
}}{{#if:{{#invoke:Data|main|Location map/data/Iraq|top}}{{#invoke:Data|main|Location map/data/Iraq|bottom}}{{#invoke:Data|main|Location map/data/Iraq|left}}{{#invoke:Data|main|Location map/data/Iraq|right}}|


* <tt>'''top''' = {{{{BASEPAGENAME}}|top}}</tt>
* <tt>'''top''' = {{#invoke:Data|main|Location map/data/Iraq|top}}</tt>
*: [[Latitude]] at top edge of map, in [[decimal degrees]]
*: [[Latitude]] at top edge of map, in [[decimal degrees]]


* <tt>'''bottom''' = {{{{BASEPAGENAME}}|bottom}}</tt>
* <tt>'''bottom''' = {{#invoke:Data|main|Location map/data/Iraq|bottom}}</tt>
*: Latitude at bottom edge of map, in decimal degrees
*: Latitude at bottom edge of map, in decimal degrees


* <tt>'''left''' = {{{{BASEPAGENAME}}|left}}</tt>
* <tt>'''left''' = {{#invoke:Data|main|Location map/data/Iraq|left}}</tt>
*: [[Longitude]] at left edge of map, in decimal degrees
*: [[Longitude]] at left edge of map, in decimal degrees


* <tt>'''right''' = {{{{BASEPAGENAME}}|right}}</tt>
* <tt>'''right''' = {{#invoke:Data|main|Location map/data/Iraq|right}}</tt>
*: Longitude at right edge of map, in decimal degrees
*: Longitude at right edge of map, in decimal degrees
}}{{#if:{{{{BASEPAGENAME}}|x}}{{{{BASEPAGENAME}}|y}}|
}}{{#if:{{#invoke:Data|main|Location map/data/Iraq|x}}{{#invoke:Data|main|Location map/data/Iraq|y}}|


* <tt>'''x''' = {{{{BASEPAGENAME}}|x}}</tt>
* <tt>'''x''' = {{#invoke:Data|main|Location map/data/Iraq|x}}</tt>
*: An expression to calculate a location on the map via its [[longitude]]; evaluates as 0 along the left edge and 100 along the right edge
*: An expression to calculate a location on the map via its [[longitude]]; evaluates as 0 along the left edge and 100 along the right edge


* <tt>'''y''' = {{{{BASEPAGENAME}}|y}}</tt>
* <tt>'''y''' = {{#invoke:Data|main|Location map/data/Iraq|y}}</tt>
*: An expression to calculate a location on the map via its [[latitude]]; evaluates as 0 along the top edge and 100 along the bottom edge
*: An expression to calculate a location on the map via its [[latitude]]; evaluates as 0 along the top edge and 100 along the bottom edge
}}{{#if:{{{{BASEPAGENAME}}|mark}}|
}}{{#if:{{#invoke:Data|main|Location map/data/Iraq|mark}}|


* <tt>'''mark''' = [[:File:{{{{BASEPAGENAME}}|mark}}|{{{{BASEPAGENAME}}|mark}}]] ([[File:{{{{BASEPAGENAME}}|mark}}|{{{{BASEPAGENAME}}|mark}}|8px]])</tt>
* <tt>'''mark''' = [[:File:{{#invoke:Data|main|Location map/data/Iraq|mark}}|{{#invoke:Data|main|Location map/data/Iraq|mark}}]] ([[File:{{#invoke:Data|main|Location map/data/Iraq|mark}}|{{#invoke:Data|main|Location map/data/Iraq|mark}}|8px]])</tt>
*: The default mark image to display with this map. This can be overridden by the <code>mark</code> parameter in [[Template:Location map]], which would otherwise default to [[:File:Red pog.svg|Red pog.svg]] ([[File:Red pog.svg|8px]]).
*: The default mark image to display with this map. This can be overridden by the <code>mark</code> parameter in [[Template:Location map]], which would otherwise default to [[:File:Red pog.svg|Red pog.svg]] ([[File:Red pog.svg|8px]]).
}}{{#if:{{{{BASEPAGENAME}}|marksize}}|
}}{{#if:{{#invoke:Data|main|Location map/data/Iraq|marksize}}|


* <tt>'''marksize''' = {{{{BASEPAGENAME}}|marksize}}</tt>
* <tt>'''marksize''' = {{#invoke:Data|main|Location map/data/Iraq|marksize}}</tt>
*: The default mark size (in [[pixel]]s) for the mark image displayed with this map (should not include <code>px</code>, for example <code>marksize={{{{BASEPAGENAME}}|marksize}}</code>, not <code>marksize={{{{BASEPAGENAME}}|marksize}}px</code>). This can be overridden by the <code>marksize</code> parameter in [[Template:Location map]], which would otherwise default to 8.
*: The default mark size (in [[pixel]]s) for the mark image displayed with this map (should not include <code>px</code>, for example <code>marksize={{#invoke:Data|main|Location map/data/Iraq|marksize}}</code>, not <code>marksize={{#invoke:Data|main|Location map/data/Iraq|marksize}}px</code>). This can be overridden by the <code>marksize</code> parameter in [[Template:Location map]], which would otherwise default to 8.
}}
}}
{{#if:{{{{BASEPAGENAME}}|image1}}|
{{#if:{{#invoke:Data|main|Location map/data/Iraq|image1}}|
== Alternative map ==
== Alternative map ==
The map defined as '''image1''' (<tt>{{{{BASEPAGENAME}}|image1}}</tt>) can be displayed by using the ''relief'' or ''AlternativeMap'' parameters in {{tl|Location map}}, {{tl|Location map many}} and {{tl|Location map+}}. {{#if:{{{{BASEPAGENAME}}|image2}}| The map defined as '''image2''' (<tt>{{{{BASEPAGENAME}}|image2}}</tt>) can only be displayed by using the ''AlternativeMap'' parameter.}} The use of these two parameters is shown in the examples below. Additional examples can be found at:
The map defined as '''image1''' (<tt>{{#invoke:Data|main|Location map/data/Iraq|image1}}</tt>) can be displayed by using the ''relief'' or ''AlternativeMap'' parameters in {{tl|Location map}}, {{tl|Location map many}} and {{tl|Location map+}}. {{#if:{{#invoke:Data|main|Location map/data/Iraq|image2}}| The map defined as '''image2''' (<tt>{{#invoke:Data|main|Location map/data/Iraq|image2}}</tt>) can only be displayed by using the ''AlternativeMap'' parameter.}} The use of these two parameters is shown in the examples below. Additional examples can be found at:
{{{!}}
{{{!}}
{{!}}
{{!}}

Revision as of 21:00, 13 March 2014

Location map of Iraq
name Iraq
border
coordinates
37.7
38.4 ←↕→ 48.9
28.4
map center 33°03′N 43°39′E / 33.05°N 43.65°E / 33.05; 43.65
image Iraq adm location map.svg
image1 Iraq physical map.svg
image2 Iraq location map.svg
Map of Iraq

Template:Location map Iraq is a location map definition used to overlay markers and labels on an equirectangular projection map of Iraq. The markers are placed by latitude and longitude coordinates on the default map or a similar map image.

Usage

These definitions are used by the following templates when invoked with parameter "Iraq":

Map definition

  • name = Lua error in package.lua at line 80: module 'main' not found.
    Name used in the default map caption
  • image = [[:File:Lua error in package.lua at line 80: module 'main' not found.|Lua error in package.lua at line 80: module 'main' not found.]]
    The default map image, without "Image:" or "File:"
  • image1 = [[:File:Lua error in package.lua at line 80: module 'main' not found.|Lua error in package.lua at line 80: module 'main' not found.]]
    An alternative map image, usually a relief map, can be displayed via the relief or AlternativeMap parameters
  • image2 = [[:File:Lua error in package.lua at line 80: module 'main' not found.|Lua error in package.lua at line 80: module 'main' not found.]]
    A second alternative map image, can be displayed via the AlternativeMap parameter only
  • top = Lua error in package.lua at line 80: module 'main' not found.
    Latitude at top edge of map, in decimal degrees
  • bottom = Lua error in package.lua at line 80: module 'main' not found.
    Latitude at bottom edge of map, in decimal degrees
  • left = Lua error in package.lua at line 80: module 'main' not found.
    Longitude at left edge of map, in decimal degrees
  • right = Lua error in package.lua at line 80: module 'main' not found.
    Longitude at right edge of map, in decimal degrees
  • x = Lua error in package.lua at line 80: module 'main' not found.
    An expression to calculate a location on the map via its longitude; evaluates as 0 along the left edge and 100 along the right edge
  • y = Lua error in package.lua at line 80: module 'main' not found.
    An expression to calculate a location on the map via its latitude; evaluates as 0 along the top edge and 100 along the bottom edge
  • mark = [[:File:Lua error in package.lua at line 80: module 'main' not found.|Lua error in package.lua at line 80: module 'main' not found.]] ([[File:Lua error in package.lua at line 80: module 'main' not found.|Lua error in package.lua at line 80: module 'main' not found.|8px]])
    The default mark image to display with this map. This can be overridden by the mark parameter in Template:Location map, which would otherwise default to Red pog.svg ().
  • marksize = Lua error in package.lua at line 80: module 'main' not found.
    The default mark size (in pixels) for the mark image displayed with this map (should not include px, for example marksize=Lua error in package.lua at line 80: module 'main' not found., not marksize=Lua error in package.lua at line 80: module 'main' not found.px). This can be overridden by the marksize parameter in Template:Location map, which would otherwise default to 8.

Alternative map

The map defined as image1 (Lua error in package.lua at line 80: module 'main' not found.) can be displayed by using the relief or AlternativeMap parameters in {{Location map}}, {{Location map many}} and {{Location map+}}. The map defined as image2 (Lua error in package.lua at line 80: module 'main' not found.) can only be displayed by using the AlternativeMap parameter. The use of these two parameters is shown in the examples below. Additional examples can be found at:

Examples using location map templates

Location map, using default map (image)

Baghdad is located in Iraq
Baghdad
Baghdad
Baghdad (Iraq)
{{Location map | Iraq
| width   = 250
| lat_deg = 33.33
| lon_deg = 44.42
| label   = Baghdad
}}

Location map many, using relief map (image1)

Location map/data/Iraq/doc is located in Iraq
Baghdad
Baghdad
Mosul
Mosul
Two locations in Iraq
{{Location map many | Iraq
| relief   = yes
| width    = 250
| caption  = Two locations in Iraq
| lat1_deg = 33.33
| lon1_deg = 44.42
| label1   = Baghdad
| lat2_deg = 36.34
| lon2_deg = 43.13
| label2   = Mosul
}}

Location map+, using AlternativeMap

Location map/data/Iraq/doc is located in Iraq
Baghdad
Baghdad
Mosul
Mosul
Two locations in Iraq
{{Location map+ | Iraq
| AlternativeMap = Iraq physical map.svg
| width   = 250
| caption = Two locations in Iraq
| places  =
  {{Location map~ | Iraq
  | lat_deg = 33.33
  | lon_deg = 44.42
  | label   = Baghdad
  }}
  {{Location map~ | Iraq
  | lat_deg = 36.34
  | lon_deg = 43.13
  | label   = Mosul
  }}
}}

See also

Location map templates
Infobox templates incorporating (passing values to) the Location map template
List