Difference between revisions of "Module:Location map/data/Egypt/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Zyxw
(update documentation and examples)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Categories and interwikis go at the bottom of this page. -->
 
<!-- Categories and interwikis go at the bottom of this page. -->
 +
[[File:Egypt-CIA WFB Map.png|thumb|220px|Map of Egypt]]
  
 
'''Template:Location map Egypt''' is a location map definition used to overlay markers and labels on an [[equirectangular projection]] map of [[Egypt]]. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map image.  
 
'''Template:Location map Egypt''' is a location map definition used to overlay markers and labels on an [[equirectangular projection]] map of [[Egypt]]. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map image.  
Line 12: Line 13:
  
 
== Map definition ==
 
== Map definition ==
; name
+
* <tt>'''name''' = {{{{BASEPAGENAME}}|name}}</tt>
: used in default map caption (<tt>{{{{BASEPAGENAME}}|name}}</tt>)
+
*: Name used in the default map caption
; image
 
: the default map image, without "Image:" or "File:" (<tt>[[:File:{{{{BASEPAGENAME}}|image}}|{{{{BASEPAGENAME}}|image}}]]</tt>)
 
; image1
 
: an alternative map image, usually a relief map (<tt>[[:File:{{{{BASEPAGENAME}}|image1}}|{{{{BASEPAGENAME}}|image1}}]]</tt>)
 
; top
 
: [[latitude]] at top edge of map, in [[decimal degrees]] (<tt>{{{{BASEPAGENAME}}|top}}</tt>)
 
; bottom
 
: latitude at bottom edge of map, in decimal degrees (<tt>{{{{BASEPAGENAME}}|bottom}}</tt>)
 
; left
 
: [[longitude]] at left edge of map, in decimal degrees (<tt>{{{{BASEPAGENAME}}|left}}</tt>)
 
; right
 
: longitude at right edge of map, in decimal degrees (<tt>{{{{BASEPAGENAME}}|right}}</tt>)
 
  
== Alternative map ==
+
* <tt>'''image''' = [[:File:{{{{BASEPAGENAME}}|image}}|{{{{BASEPAGENAME}}|image}}]]</tt>
The map shown above as '''image1''' (<tt>{{{{BASEPAGENAME}}|image1}}</tt>) can be displayed by using the ''AlternativeMap'' or ''relief'' parameters in {{tl|Location map}}, {{tl|Location map many}} and {{tl|Location map+}}. Further instructions can be found at [[Template:Location map#Using Alternative Map]] and [[Template:Location map#Relief]], or see the examples below.
+
*: The default map image, without "Image:" or "File:"
 +
{{#if:{{{{BASEPAGENAME}}|image1}}|
 +
 
 +
* <tt>'''image1''' = [[:File:{{{{BASEPAGENAME}}|image1}}|{{{{BASEPAGENAME}}|image1}}]]</tt>
 +
*: An alternative map image, usually a relief map, can be displayed via the ''relief'' or ''AlternativeMap'' parameters
 +
}}{{#if:{{{{BASEPAGENAME}}|image2}}|
 +
 
 +
* <tt>'''image2''' = [[:File:{{{{BASEPAGENAME}}|image2}}|{{{{BASEPAGENAME}}|image2}}]]</tt>
 +
*: A second alternative map image, can be displayed via the ''AlternativeMap'' parameter only
 +
}}{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
 +
 
 +
* <tt>'''top''' = {{{{BASEPAGENAME}}|top}}</tt>
 +
*: [[Latitude]] at top edge of map, in [[decimal degrees]]
 +
 
 +
* <tt>'''bottom''' = {{{{BASEPAGENAME}}|bottom}}</tt>
 +
*: Latitude at bottom edge of map, in decimal degrees
 +
 
 +
* <tt>'''left''' = {{{{BASEPAGENAME}}|left}}</tt>
 +
*: [[Longitude]] at left edge of map, in decimal degrees
 +
 
 +
* <tt>'''right''' = {{{{BASEPAGENAME}}|right}}</tt>
 +
*: Longitude at right edge of map, in decimal degrees
 +
}}{{#if:{{{{BASEPAGENAME}}|x}}{{{{BASEPAGENAME}}|y}}|
 +
 
 +
* <tt>'''x''' = {{{{BASEPAGENAME}}|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
  
== Examples ==
+
* <tt>'''y''' = {{{{BASEPAGENAME}}|y}}</tt>
=== Location map, using default map (image) ===
+
*: 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
{{Location map | Egypt
 
| width = 200 <!--omit "px"-->
 
| label = Alexandria
 
| lat  = 31.2
 
| long  = 29.9
 
 
}}
 
}}
<pre style="width:35em">
+
{{#if:{{{{BASEPAGENAME}}|image1}}|
{{Location map | Egypt
+
== Alternative map ==
| width = 200 <!--omit "px"-->
+
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:
| label = Alexandria
+
{{{!}}
| lat  = 31.2
+
{{!}}
| long  = 29.9
+
* [[Template:Location map#Relief parameter]]
}}
+
* [[Template:Location map#AlternativeMap parameter]]
{{Location map | Egypt
+
{{!}}
| width = 200 <!--omit "px"-->
+
* [[Template:Location map+/relief]]
| label = Cairo
+
* [[Template:Location map+/AlternativeMap]]
| lat  = 30.05
+
{{!}}}
| long  = 31.22
 
}}
 
{{Location map | Egypt
 
| width = 200 <!--omit "px"-->
 
| label = Cairo
 
| lat  = 30.05
 
| long  = 31.22
 
 
}}
 
}}
</pre>
+
== Examples using location map templates ==
{{clear}}
 
  
=== Location map, using relief map (image1) ===
+
=== Location map, using default map (image) ===
 
{{Location map | Egypt
 
{{Location map | Egypt
| relief    = yes
+
| width  = 220 <!--omit "px"-->
| float    = right <!--or left/center)-->
+
| lat_deg = 31.2
| width    = 200
+
| lon_deg = 29.9
| caption  = Berenice on Red Sea
+
| label   = Alexandria
| lat      = 23.92
 
| long      = 35.45
 
| label     = Berenice
 
| label_size= 70
 
| background= #44CCDD <!--aqua-->
 
| position  = left <!--or right/top/bottom -->
 
| mark      = Green_pog.svg <!--marker image-->
 
| marksize  = 10 <!--default: 8, 1=none -->
 
 
}}
 
}}
 
<pre style="width:35em">
 
<pre style="width:35em">
 
{{Location map | Egypt
 
{{Location map | Egypt
| relief    = yes
+
| width  = 220 <!--omit "px"-->
| float    = right <!--or left/center)-->
+
| lat_deg = 31.2
| width    = 200
+
| lon_deg = 29.9
| caption  = Berenice on Red Sea
+
| label   = Alexandria
| lat      = 23.92
 
| long      = 35.45
 
| label     = Berenice
 
| label_size= 70
 
| background= #44CCDD <!--aqua-->
 
| position  = left <!--or right/top/bottom -->
 
| mark      = Green_pog.svg <!--marker image-->
 
| marksize  = 10 <!--default: 8, 1=none -->
 
 
}}
 
}}
 
</pre>
 
</pre>
 
{{clear}}
 
{{clear}}
  
=== Location map many, using default map ===
+
=== Location map many, using relief map (image1) ===
 
{{Location map many | Egypt
 
{{Location map many | Egypt
| <!--map settings-->
+
| relief      = yes
| width      = 200
+
| width      = 220
| float      = right
+
| caption    = Alexandria, Cairo, and Aswan
| caption    = Alexandria, Cairo and Aswan Cities
+
| lat1_deg    = 31.2
| <!--1st label settings-->
+
| lon1_deg    = 29.92
| lat        = 31.2
+
| label1      = Alexandria  
| long        = 29.92
+
| position1  = left
| label      = Alexandria  
+
| lat2_deg   = 30.05
| label_size  = 70
+
| lon2_deg    = 31.22
| background  = DarkWhite
 
| position   = right
 
| mark        = Blue pog.svg
 
| marksize    = 10
 
| <!--2nd label settings-->
 
| lat2        = 30.05
 
| long2      = 31.22
 
 
| label2      = Cairo
 
| label2      = Cairo
| label2_size = 70
+
| position2  = bottom
| background2 = DarkWhite
+
| lat3_deg    = 24.06
| position2  = left
+
| lon3_deg    = 32.91
| mark2      = Blue pog.svg
+
| label3     = Aswan
| mark2size  = 10
+
| position3   = top
| <!--3rd label settings-->
 
| lat2        = 24.06
 
| long2      = 32.91
 
| label2     = Aswan
 
| label2_size = 70
 
| background2 = DarkWhite
 
| position2   = top
 
| mark2      = Blue pog.svg
 
| mark2size  = 10
 
 
 
 
}}
 
}}
 
<pre style="width:35em">
 
<pre style="width:35em">
 
{{Location map many | Egypt
 
{{Location map many | Egypt
| <!--map settings-->
+
| relief      = yes
| width      = 200
+
| width      = 220
| float      = right
+
| caption    = Alexandria, Cairo, and Aswan
| caption    = Alexandria, Cairo and Aswan Cities
+
| lat1_deg    = 31.2
| <!--1st label settings-->
+
| lon1_deg    = 29.92
| lat        = 31.20
+
| label1      = Alexandria  
| long        = 29.92
+
| position1  = left
| label      = Alexandria  
+
| lat2_deg   = 30.05
| label_size  = 70
+
| lon2_deg    = 31.22
| background  = DarkWhite
 
| position   = right
 
| mark        = Blue pog.svg
 
| marksize    = 10
 
| <!--2nd label settings-->
 
| lat2        = 30.05
 
| long2      = 31.22
 
 
| label2      = Cairo
 
| label2      = Cairo
| label2_size = 70
+
| position2  = bottom
| background2 = DarkWhite
+
| lat3_deg    = 24.06
| position2  = left
+
| lon3_deg    = 32.91
| mark2      = Blue pog.svg
+
| label3     = Aswan
| mark2size  = 10
+
| position3   = top
| <!--3rd label settings-->
 
| lat2        = 24.06
 
| long2      = 32.91
 
| label2     = Aswan
 
| label2_size = 70
 
| background2 = DarkWhite
 
| position2   = top
 
| mark2      = Blue pog.svg
 
| mark2size  = 10
 
 
}}
 
}}
 
</pre>
 
</pre>
Line 168: Line 120:
 
{{Location map+ | Egypt
 
{{Location map+ | Egypt
 
| AlternativeMap = Egypt relief location map.jpg
 
| AlternativeMap = Egypt relief location map.jpg
| width  = 200
+
| width  = 220
 
| caption = Two locations in Egypt
 
| caption = Two locations in Egypt
 
| places  =
 
| places  =
 
   {{Location map~ | Egypt
 
   {{Location map~ | Egypt
   | lat  = 31.61
+
   | lat_deg = 31.61
   | long  = 25.92
+
   | lon_deg = 25.92
   | label = Sallum  
+
   | label   = Sallum  
 
   }}
 
   }}
 
   {{Location map~ | Egypt
 
   {{Location map~ | Egypt
   | lat  = 22.34
+
   | lat_deg = 22.34
   | long  = 31.37
+
   | lon_deg = 31.37
   | label = Abu Simbel
+
   | label   = Abu Simbel
 
   }}
 
   }}
 
}}
 
}}
Line 185: Line 137:
 
{{Location map+ | Egypt
 
{{Location map+ | Egypt
 
| AlternativeMap = Egypt relief location map.jpg
 
| AlternativeMap = Egypt relief location map.jpg
| width  = 200
+
| width  = 220
 
| caption = Two locations in Egypt
 
| caption = Two locations in Egypt
 
| places  =
 
| places  =
 
   {{Location map~ | Egypt
 
   {{Location map~ | Egypt
   | lat  = 31.61
+
   | lat_deg = 31.61
   | long  = 25.92
+
   | lon_deg = 25.92
   | label = Sallum  
+
   | label   = Sallum  
 
   }}
 
   }}
 
   {{Location map~ | Egypt
 
   {{Location map~ | Egypt
   | lat  = 22.34
+
   | lat_deg = 22.34
   | long  = 31.37
+
   | lon_deg = 31.37
   | label = Abu Simbel
+
   | label   = Abu Simbel
 
   }}
 
   }}
 
}}
 
}}
Line 210: Line 162:
  
 
== See also ==
 
== See also ==
* [[Template:Location map]]
+
* [[Template:Location map Egypt relief]], displays the relief map shown above (for [[Help:Infobox|infoboxes]] that do not support alternative maps)
* [[Template:Location map+]]
+
 
* [[Template:Location map many]]
+
; Location map templates
* [[Template:Location map Egypt relief]]
+
* [[Template:Location map]], to display one mark and label using latitude and longitude
 +
* [[Template:Location map many]], to display up to nine marks and labels
 +
* [[Template:Location map+]], to display an unlimited number of marks and labels
 +
 
 +
; Infobox templates incorporating (passing values to) the Location map template
 +
{{Location map/doc/See also infobox templates}}
 
<includeonly>
 
<includeonly>
 
<!-- Categories and interwikis go here: -->
 
<!-- Categories and interwikis go here: -->
  
 
</includeonly>
 
</includeonly>

Revision as of 08:13, 5 February 2013

Template:Location map Egypt is a location map definition used to overlay markers and labels on an equirectangular projection map of Egypt. 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 "Egypt":

Map definition

Alternative map

The map defined as image1 (Template:Location map/data/Egypt) can be displayed by using the relief or AlternativeMap parameters in {{Location map}}, {{Location map many}} and {{Location map+}}. The map defined as image2 (Template:Location map/data/Egypt) 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)

Alexandria (Egypt)
{{Location map | Egypt
| width   = 220 <!--omit "px"-->
| lat_deg = 31.2
| lon_deg = 29.9
| label   = Alexandria
}}

Location map many, using relief map (image1)

Alexandria, Cairo, and Aswan
{{Location map many | Egypt
| relief      = yes
| width       = 220
| caption     = Alexandria, Cairo, and Aswan
| lat1_deg    = 31.2
| lon1_deg    = 29.92
| label1      = Alexandria 
| position1   = left
| lat2_deg    = 30.05
| lon2_deg    = 31.22
| label2      = Cairo
| position2   = bottom
| lat3_deg    = 24.06
| lon3_deg    = 32.91
| label3      = Aswan
| position3   = top
}}

Location map+, using AlternativeMap

{{Location map+ | Egypt
| AlternativeMap = Egypt relief location map.jpg
| width   = 220
| caption = Two locations in Egypt
| places  =
  {{Location map~ | Egypt
  | lat_deg = 31.61
  | lon_deg = 25.92
  | label   = Sallum 
  }}
  {{Location map~ | Egypt
  | lat_deg = 22.34
  | lon_deg = 31.37
  | label   = Abu Simbel
  }}
}}

Other options

It is possible to place markers/labels outside a map, by specifying latitude outside 20.5-32.8 or longitude coordinates beyond 25.5-35.8:

  • Over longitude=35.8 will push a label off-map to the right;
  • Under longitude= 20.5 will push a label off-map to the left;
  • Over latitude= 32.8 will push a label off-map to the top.

For templates that restrict coordinates, expand the minutes field: lat_deg=32.0 but lat_min=120 yielding a combined 34 degrees (60 minutes = 1 degree).

See also

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