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

From blackwiki
Jump to navigation Jump to search
blackwiki>Zyxw
(→‎Alternative map: update instructions)
m (18 revisions imported)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#switch:{{{1}}}<!-- COPY of parameter settings: -->
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
| name  = Egypt
+
{{Module:Location map/data/doc
| top    = 32.8
+
|image=[[File:Egypt-CIA WFB Map.png|thumb|220px|Map of Egypt]]
| bottom = 20.8
+
|examples=
| left  = 25.3
+
=== Location map, using default map (image) ===
| right  = 35.8
+
{{Location map | Egypt
| skew  = 1.0
+
| width  = 220 <!--omit "px"-->
| image = Egypt-region-map-cities.gif
+
| lat_deg = 31.2
| skew  = 1.000 <!--to squeeze upper longitudes-->
+
| lon_deg = 29.9
| lat_skew = 0.000 <!--to arc outer latitudes-->
+
| label   = Alexandria
}}<!--COPY: Live settings in Location_map_Egypt.
 
--
 
-- The above switch-statement branches by text in parameter1,
 
-- returning the associated value after each equals sign ("=").
 
-->
 
The map definition, '''Template:Location_map_Egypt''', is intended for overlaying markers/labels on similar maps of [[Egypt]], using coordinates of 20.8-32.8 for [[latitude]] and 25.3-35.8 for [[longitude]].<br/>
 
Some of the related mapping procedures are:
 
 
 
* [[Template:Location_map]] - places a marker symbol/label on an image;
 
* [[Template:Location_map_many]] - places multiple marker symbols/labels on an image;
 
* [[Template:Location_map_skew]] - puts symbols/labels on an image with converging longitudes.
 
 
 
[[File:Egypt-region-map-cities-2.gif|left|thumb|210px|Map for Egypt]]
 
 
 
{| class="wikitable" width="320"
 
|-
 
| align=center colspan="3" style="background-color:#DDD; color:#000" | '''Map parameters'''
 
|-
 
| top    || {{Location map Egypt|top}}
 
| latitude at top of map
 
|-
 
| bottom || {{Location map Egypt|bottom}}
 
| latitude at bottom of map
 
|-
 
| left  || {{Location map Egypt|left}}
 
| longitude at map left edge
 
|-
 
| right || {{Location map Egypt|right}}
 
| longitude at map right edge
 
|-
 
| skew  || {{Location map Egypt|skew}}
 
| skew to narrow longitudes
 
|-
 
| lat_skew || {{Location map Egypt|lat_skew}}
 
| skew to arc latitudes at edges
 
|}
 
See {{tl|Location map}} for description of the parameters.
 
{{-}}<!-- force separation break -->
 
 
 
All mapping templates use similar parameters (see ''[[#Examples|Examples]]''):
 
<code>
 
:* Egypt  - the first parameter is always the map name
 
:* AlternativeMap - name of image (omit "Image:")
 
:* caption=text  - caption text along bottom of image
 
:* width=250 - for image width (omit "px")
 
:* label=xxx - movable label (can be padded "&amp;nbsp;XX&amp;nbsp;YY&amp;nbsp;")
 
:* label_size - percent from 0-200 (default: 95)
 
:* background - color of label (such as: darkorange or #4499DD)
 
:* position=right - (or left, top, bottom) position of label at marker
 
:* lat =26.25  - for latitude 20.8-32.8 (higher towards top)
 
:* long=31.92  - for longitude 25.3-35.8 (higher towards right)
 
:* mark &nbsp; &nbsp; - name of image for marker symbol (omit "Image:")
 
:* marksize - size (in pixels) of marker-symbol (default: 8, 1=none)
 
:* float=right (or left, center) - position of map formatted on page
 
</code>
 
Some common label background colors are: <small>#</small>CCCC55 for <font color=#CCCC55>'''dim yellow'''</font>,
 
::* <small>#</small>44EE44 for <font color=#44EE44>'''lime green'''</font>, <small>#</small>BBBBBB for <font color=#BBBBBB>'''gray'''</font>,
 
::* <small>#</small>44CCDD for <font color=#44CCDD>'''light aqua'''</font>, <small>#</small>DDDDDD for <font color=#DDDDDD>'''light gray'''</font> (almost white),
 
::* PaleGreen for <font color=PaleGreen>'''pale green'''</font>, <font color=PaleTurquoise>'''PaleTurquoise'''</font>, <font color=DarkOrange>'''DarkOrange'''</font>, etc.
 
::* By default, the label is ''transparent'' overwriting the image.
 
For small lettering use label_size=80, for tiny words use 55.  Note that the words in the label will wrap unless using "nbsp": <small>DO&amp;nbsp;NOT&amp;nbsp;WRAP</small>.
 
 
 
When specifying image "width=270" be sure to ''OMIT'' "px" (which causes the image to span the width of the screen) because "px" cannot (yet) be detected by the (new) MediaWiki language which processes those mapping templates.
 
 
 
See each specific mapping template for other parameters to pass.
 
 
 
== How to use an alternative map ==
 
This template normally displays the map shown above as '''image''':
 
*<tt>{{{{BASEPAGENAME}}|image}}</tt>.
 
The ''AlternativeMap'' parameter in [[Template:Location map]] can be used to display {{#if:{{{{BASEPAGENAME}}|image2}}|one of the following images|the following image}}:
 
*<tt>{{{{BASEPAGENAME}}|image1}}</tt>
 
{{#if:{{{{BASEPAGENAME}}|image2}}|
 
*<tt>{{{{BASEPAGENAME}}|image2}}</tt>
 
 
}}
 
}}
Further instructions and examples can be found at [[Template:Location map#Using Alternative Map]].
+
<pre style="width:35em">
 
 
==Examples==
 
<!-- ----------------------------- Abydos -->
 
 
{{Location map | Egypt
 
{{Location map | Egypt
| <!--AlternativeMap= --><!--name of image (omit "Image:")-->
+
| width   = 220 <!--omit "px"-->
| caption = Example for Abydos in Egypt
+
| lat_deg = 31.2
| width=210 <!--omit "px" or image will span page-->
+
| lon_deg = 29.9
| label=Abydos
+
| label  = Alexandria
| label_size=90
 
| background = #DDDD44
 
| position=top <!--or left/right/bottom -->
 
| lat  = 26.18
 
| long = 31.92
 
| mark=Red_pog.svg <!--image for marker (omit "Image:")-->
 
| marksize=10 <!--marker size (default: 8, 1=none)-->
 
| float=right <!--(or left, center) - position of map-->
 
 
}}
 
}}
<code><!--indent next line by 1 space to trigger quote-box -->
+
</pre>
<nowiki>{{</nowiki>Location map | Egypt
+
{{clear}}
| caption = Example for Abydos in Egypt
 
| width=210 <!--omit "px"-->
 
| label=Abydos
 
| label-size=90
 
| background = #DDDD44
 
| position=top <!--or left/right/bottom-->
 
| lat  = 26.18 <!--latitude 20.5-32.8 -->
 
| long = 31.92 <!--longitude 25.3-35.8-->
 
| mark=Red_pog2.svg <!--marker (omit "Image:")-->
 
| marksize=10 <!--default: 8, 1=none-->
 
| float=right <!--left/center-->
 
}}
 
</code>
 
  
<!-- --------------------------------- Berenice -->
+
=== Location map many, using relief map (image1) ===
{{Location map | Egypt
+
{{Location map many | Egypt
| <!--AlternativeMap= --><!--name of image (omit "Image:")-->
+
| relief      = yes
| caption = Berenice on Red Sea
+
| width      = 220
| width=210 <!--omit "px" or image will span page-->
+
| caption     = Alexandria, Cairo, and Aswan
| label=Berenice
+
| lat1_deg    = 31.2
| label_size=70
+
| lon1_deg    = 29.92
| background = <!--aqua-->#44CCDD
+
| label1      = Alexandria
| position=left <!--or right/top/bottom -->
+
| position1  = left
| lat  = 23.92
+
| lat2_deg    = 30.05
| long = 35.45
+
| lon2_deg    = 31.22
| mark=Green_pog.svg <!--image for marker (omit "Image:")-->
+
| label2      = Cairo
| marksize=10 <!--marker size (default: 8, 1=none)-->
+
| position2  = bottom
| float=right <!--(or left, center) - position of map-->
+
| lat3_deg    = 24.06
 +
| lon3_deg    = 32.91
 +
| label3      = Aswan
 +
| position3  = top
 +
}}
 +
<pre style="width:35em">
 +
{{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
 
}}
 
}}
<code><!--indent next line by 1 space to trigger quote-box -->
+
</pre>
<nowiki>{{Location map | Egypt
+
{{clear}}
| caption = Berenice on Red Sea
 
| width=210 <!--omit "px"-->
 
| label=Berenice
 
| label-size=70
 
| background = <!--aqua-->#44CCDD
 
| position=left<!--right/top/bottom-->
 
| lat = 23.92 <!--latitude 20.5-32.8 -->
 
| long= 35.45 <!--longitude 25.3-35.8-->
 
| mark=Green_pog.svg <!--omit "Image:"-->
 
| marksize=10 <!--default: 8, 1=none-->
 
| float=right <!--left/center--></nowiki>
 
}}
 
</code>
 
  
<!-- --------------------------------- Sallum / Abu Simbel -->
+
=== Location map+, using AlternativeMap ===
{{Location map many | Egypt
+
{{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
 +
  }}
 +
}}
 +
<pre style="width:35em">
 +
{{Location map+ | Egypt
 
| AlternativeMap = Egypt relief location map.jpg
 
| AlternativeMap = Egypt relief location map.jpg
| width=210 <!--omit "px" or image will span page-->
+
| width   = 220
| label=Sallum | label_size=70
+
| caption = Two locations in Egypt
  | background = #DDDD44
+
| places  =
   | position=right<!--or left/top/bottom-->
+
   {{Location map~ | Egypt
   | lat = 31.61 | long = 25.92
+
   | lat_deg = 31.61
   | mark=Blue_pog.svg <!--image for marker-->
+
  | lon_deg = 25.92
   | marksize=10 <!--marker size (default: 8)-->
+
   | label   = Sallum
| label2=Abu&nbsp;Simbel | label2_size=70
+
   }}
   | background2 = DarkOrange
+
   {{Location map~ | Egypt
   | position2=top <!--or left/right/bottom -->
+
   | lat_deg = 22.34
   | lat2 = 22.34 | long2 = 31.37
+
  | lon_deg = 31.37
   | mark2=Blue_pog.svg <!--image for marker (omit "Image:")-->
+
   | label   = Abu Simbel
   | mark2size=10 <!--marker size (default: 8, 1=none)-->
+
  }}
| float=right <!--(or left, center) - position of map-->
 
| caption = Sallum north, Abu Simbel in south
 
 
}}
 
}}
<code><!--indent next line by 1 space to trigger quote-box -->
+
</pre>
<nowiki>{{</nowiki>Location map many | Egypt
+
| see also =
| AlternativeMap = Egypt relief location map.jpg
+
}}<includeonly>
| width=210 <!--omit "px"-->
+
<!-- Categories go here: -->
| label=Sallum | label_size=70
+
[[Category:Maps of Egypt]]
  | background = #DDDD44
+
[[Category:Egypt location map templates| ]]
  | position=right<!--or left/top/bottom-->
+
</includeonly>
  | lat = 31.61 | long = 25.92
 
  | mark=Blue_pog.svg <!--image for marker-->
 
  | marksize=10 <!--marker size-->
 
| label2=Abu&nbsp;Simbel | label2_size=70
 
  | background2 = DarkOrange
 
  | position2=top
 
  | lat2 = 22.34 | long2 = 31.37
 
  | mark2=Blue_pog.svg <!--image for marker (omit "Image:")-->
 
  | mark2size=10 <!--marker size (default: 8, 1=none)-->
 
| float=right <!--left/center-->
 
| caption = Sallum north, Abu Simbel in south
 
}}
 
</code>
 
 
 
==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==
 
* [[Template:Superimpose]] - to label an image without a border box
 
* [[Template:Location map USA]] - for mapping the "lower 48" states
 
* [[Template:Location map Egypt relief]]
 

Latest revision as of 06:41, 27 September 2020


Location map of Egypt
name Egypt
border
coordinates
32.1
24.2 ←↕→ 37.3
21.3
map center Lua error: callParserFunction: function "#coordinates" was not found.
image Egypt adm location map.svg
400x400px
image1 Egypt relief location map.jpg
400x400px

Module:Location map/data/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

  • name = Egypt
    Name used in the default map caption
  • bottom = 21.3
    Latitude at bottom edge of map, in decimal degrees
  • left = 24.2
    Longitude at left edge of map, in decimal degrees
  • right = 37.3
    Longitude at right edge of map, in decimal degrees

Alternative map

The {{Location map}}, {{Location map many}}, and {{Location map+}} templates have parameters to specify an alternative map image. The map displayed as image1 can be used with the relief or AlternativeMap parameters. Examples may be found below or in the following:

Precision

Longitude: from West to East this map definition covers 13.1 degrees.

  • At an image width of 200 pixels, that is 0.0655 degrees per pixel.
  • At an image width of 1000 pixels, that is 0.0131 degrees per pixel.

Latitude: from North to South this map definition covers 10.8 degrees.

  • At an image height of 200 pixels, that is 0.054 degrees per pixel.
  • At an image height of 1000 pixels, that is 0.0108 degrees per pixel.

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
  }}
}}

See also

Location map templates

Creating new map definitions