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

From blackwiki
Jump to navigation Jump to search
blackwiki>Plastikspork
(→‎See also: Merged)
m (19 revisions imported)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
<!-- Categories and interwikis go at the bottom of this page. -->
+
{{Module:Location map/data/doc|name=the [[U.S. state]] of [[Alabama]]
[[File:Map of Alabama NA.png|thumb|400px|Map of Alabama (click on map to see larger image)]]
+
|image=[[File:Map of Alabama NA.png|thumb|400px|Map of Alabama (click on map to see larger image)]]
 
+
|examples=
'''Template:Location map USA Alabama''' is a location map definition used to overlay markers and labels on an [[equirectangular projection]] map of [[Alabama]]. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map image.
+
=== Location map ===
 
+
{{Location map | USA Alabama
== Usage ==
+
| width  = 200
These definitions are used by the following templates when invoked with parameter "USA Alabama":
+
| lat_deg = 32 | lat_min = 21 | lat_sec = 42 | lat_dir = N
* {{tlx|Location map | USA Alabama&nbsp;| ...}}
+
| lon_deg = 086 | lon_min = 16 | lon_sec = 45 | lon_dir = W
* {{tlx|Location map many | USA Alabama&nbsp;| ...}}
+
| label  = Montgomery
* {{tlx|Location map+ | USA Alabama&nbsp;| ...}}
 
* {{tlx|Location map~ | USA Alabama&nbsp;| ...}}
 
 
 
== Map definition ==
 
* <tt>'''name''' = {{{{BASEPAGENAME}}|name}}</tt>
 
*: Name used in the default map caption
 
 
 
* <tt>'''image''' = [[:File:{{{{BASEPAGENAME}}|image}}|{{{{BASEPAGENAME}}|image}}]]</tt>
 
*: 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}}|mark}}|
 
 
 
* <tt>'''mark''' = [[:File:{{{{BASEPAGENAME}}|mark}}]] ( [[File:{{{{BASEPAGENAME}}|mark}}|8px]] )</tt>
 
*: A location marker image to be used for this map, in place of the default image <tt>[[:File:Red pog.svg]] ( [[File:Red pog.svg|8px]] )</tt>
 
}}{{#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
 
 
 
* <tt>'''y''' = {{{{BASEPAGENAME}}|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
 
 
}}
 
}}
{{#if:{{{{BASEPAGENAME}}|image1}}|
+
<pre style="width:40em">
== Alternative map ==
+
{{Location map | USA Alabama
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:
+
| width  = 200
{{{!}}
+
| lat_deg = 32 | lat_min = 21 | lat_sec = 42 | lat_dir = N
{{!}}
+
| lon_deg = 086 | lon_min = 16 | lon_sec = 45 | lon_dir = W
* [[Template:Location map#Relief parameter]]
+
| label  = Montgomery
* [[Template:Location map#AlternativeMap parameter]]
 
{{!}}
 
* [[Template:Location map+/relief]]
 
* [[Template:Location map+/AlternativeMap]]
 
{{!}}}
 
 
}}
 
}}
== Examples using location map templates ==
+
</pre>
 +
{{clear}}
  
{{Location map
+
=== Location map many ===
| USA Alabama
+
{{Location map many | USA Alabama
| label = Huntsville | position = left
+
| width    = 200
| label_size = 90 <!-- percent 0-900% -->
+
| caption  = Locations in Alabama
| caption = Show "Huntsville" on map
+
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
| lat_deg = 34 | lat_min = 42.8 | lat_dir = N
+
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
| lon_deg = 86 | lon_min = 35.2 | lon_dir = W
+
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
| background = #FFFF99
+
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
| float = right | width = 160
 
 
}}
 
}}
Example labeling "[[Huntsville, Alabama|Huntsville]]":
+
<pre style="width:40em">
<code>
+
{{Location map many | USA Alabama
:<nowiki>{{Location map</nowiki>
+
| width    = 200
:<nowiki>| USA Alabama</nowiki>
+
| caption  = Locations in Alabama
:<nowiki>| label = Huntsville | position = left</nowiki>
+
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
:<nowiki>| label_size = 90 <!--percent 0-900%--></nowiki>
+
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
:<nowiki>| caption = Show "Huntsville" on map</nowiki>
+
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
:<nowiki>| lat_deg = 34 </nowiki>&nbsp;<nowiki>| lat_min = 42.8 | lat_dir = N</nowiki>
+
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
:<nowiki>| lon_deg = 86 | lon_min = 35.2 | lon_dir = W</nowiki>
+
}}
:<nowiki>| background = #FFFF99</nowiki>
+
</pre>
:<nowiki>| float = right</nowiki>
+
{{clear}}
:<nowiki>| width = 160 <!--DON'T add "px"--></nowiki>
 
:<nowiki>}}</nowiki></code>
 
 
 
: Note that both lon_deg and lon_min are negative numbers, for the Western Hemisphere.
 
  
<!-- ------------------------- Showing Mobile -->
+
=== Location map+ ===
{{Location map
+
{{Location map+ | USA Alabama
| USA Alabama
+
| width  = 200
| label = Mobile | position = top
+
| caption = Locations in Alabama
| label_size = 90 <!-- percent 0-900% -->
+
| places  =
| caption = Show "Mobile" on map
+
  {{Location map~ | USA Alabama
| lat_deg = 30 | lat_min = 40.8 | lat_dir = N
+
  | lat = 34.987 | long = -86.843 | label = Ardmore
| lon_deg = 88 | lon_min = 6.2 | lon_dir = W
+
  }}
| background = #FFCC66 <!--orange-->
+
  {{Location map~ | USA Alabama
| float = right
+
  | lat = 30.268 | long = -87.701 | label = Gulf Shores
| width = 160
+
  }}
| AlternativeMap = <!-- none (use default map) -->
+
  {{Location map~ | USA Alabama
 +
  | lat = 31.931 | long = -88.459 | label = Melvin
 +
  }}
 +
  {{Location map~ | USA Alabama
 +
  | lat = 32.863 | long = -85.200 | label = Lanett
 +
  }}
 
}}
 
}}
Example for orange "[[Mobile, Alabama|Mobile]]" at bottom:
+
<pre style="width:40em">
<code>
+
{{Location map+ | USA Alabama
:<nowiki>{{Location map</nowiki>
+
| width  = 200
:<nowiki>| USA Alabama</nowiki>
+
| caption = Locations in Alabama
:<nowiki>| label = Mobile | position = top</nowiki>
+
| places  =
:<nowiki>| label_size = 90 <!-- 0-900%--></nowiki>
+
  {{Location map~ | USA Alabama
:<nowiki>| caption = Show "Mobile" on map</nowiki>
+
  | lat = 34.987 | long = -86.843 | label = Ardmore
:<nowiki>| lat_deg = 30 </nowiki>&nbsp;<nowiki>| lat_min = 40.8 | lat_dir = N</nowiki>
+
  }}
:<nowiki>| lon_deg = 88 | lon_min = 6.2 | lon_dir = W</nowiki>
+
  {{Location map~ | USA Alabama
:<nowiki>| background = #FFCC66 <!--orange--></nowiki>
+
  | lat = 30.268 | long = -87.701 | label = Gulf Shores
:<nowiki>| float = right</nowiki>
+
  }}
:<nowiki>| width = 160 <!--DON'T add "px"--></nowiki>
+
  {{Location map~ | USA Alabama
:<nowiki>| AlternativeMap = <!-- none (default)--></nowiki>
+
  | lat = 31.931 | long = -88.459 | label = Melvin
:<nowiki>}}</nowiki></code>
+
  }}
 
+
  {{Location map~ | USA Alabama
<!-- ------------------------- Showing Left edge -->
+
  | lat = 32.863 | long = -85.200 | label = Lanett
{{Location map
+
  }}
| USA Alabama
 
| label = left edge | position = right
 
| label_size = 90 <!-- percent 0-900% -->
 
| caption = Show "left edge" on map
 
| lat = 31.1
 
| long = -88.7
 
| background = #33DD44 <!--green-->
 
| float = right
 
| width = 160
 
 
}}
 
}}
Example for green "left edge" at side:
+
</pre>
<code>
+
|see also=
:<nowiki>{{Location map</nowiki>
+
* [[Module:Location map/data/USA]]
:<nowiki>| USA Alabama</nowiki>
 
:<nowiki>| label = left edge | position = right</nowiki>
 
:<nowiki>| label_size = 90 <--percent 0-900%--></nowiki>
 
:<nowiki>| caption = Show "left edge" on map</nowiki>
 
:<nowiki>| lat = 31.1</nowiki>
 
:<nowiki>| long = -88.7</nowiki>
 
:<nowiki>| background = #33DD44 <!--green--></nowiki>
 
:<nowiki>| float = right</nowiki>
 
:<nowiki>| width = 160</nowiki>
 
:<nowiki>}}</nowiki></code>
 
 
 
<!-- ------------------------- Showing Right edge -->
 
{{Location map
 
| USA Alabama
 
| label = right edge | position = left
 
| label_size = 90 <!-- percent 0-900% -->
 
| caption = Show map "right edge"
 
| lat = 31.1
 
| long = -84.7
 
| background = #33DD44 <!--green-->
 
| float = right
 
| width = 160
 
 
}}
 
}}
Example for green "right edge" at side:
 
<code>
 
:<nowiki>{{Location map</nowiki>
 
:<nowiki>| USA Alabama</nowiki>
 
:<nowiki>| label = right edge | position = left</nowiki>
 
:<nowiki>| label_size = 90 <--percent 0-900%--></nowiki>
 
:<nowiki>| caption = Show map "right edge"</nowiki>
 
:<nowiki>| lat = 31.1</nowiki>
 
:<nowiki>| long = -84.7</nowiki>
 
:<nowiki>| background = #33DD44 <!--green--></nowiki>
 
:<nowiki>| float = right</nowiki>
 
:<nowiki>| width = 160</nowiki>
 
:<nowiki>}}</nowiki></code>
 
 
== See also ==
 
* [[Template:Location map USA]]
 
 
; Location map templates
 
* [[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 go here -->
+
<!-- Categories go here, and interwikis go in Wikidata -->
 
{{DEFAULTSORT:Alabama, Location map USA}}
 
{{DEFAULTSORT:Alabama, Location map USA}}
[[Category:United States state location maps]]
+
[[Category:United States state location map templates]]
  
 
</includeonly>
 
</includeonly>

Latest revision as of 07:31, 27 September 2020


Location map of Alabama
name Alabama
border
coordinates
35.2
-88.7 ←↕→ -84.7
29.9
map center Lua error: callParserFunction: function "#coordinates" was not found.
image USA Alabama location map.svg
400x400px
File:Map of Alabama NA.png
Map of Alabama (click on map to see larger image)

Module:Location map/data/USA Alabama is a location map definition used to overlay markers and labels on an equirectangular projection map of the U.S. state of Alabama. 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 "USA Alabama":

Map definition

  • name = Alabama
    Name used in the default map caption
  • bottom = 29.9
    Latitude at bottom edge of map, in decimal degrees
  • left = -88.7
    Longitude at left edge of map, in decimal degrees
  • right = -84.7
    Longitude at right edge of map, in decimal degrees

Precision

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

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

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

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

Examples using location map templates

Location map

Montgomery (Alabama)
{{Location map | USA Alabama
| width   = 200
| lat_deg =  32 | lat_min = 21 | lat_sec = 42 | lat_dir = N 
| lon_deg = 086 | lon_min = 16 | lon_sec = 45 | lon_dir = W
| label   = Montgomery
}}

Location map many

{{Location map many | USA Alabama
| width    = 200
| caption  = Locations in Alabama
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
}}

Location map+

{{Location map+ | USA Alabama
| width   = 200
| caption = Locations in Alabama
| places  =
  {{Location map~ | USA Alabama
  | lat = 34.987 | long = -86.843 | label = Ardmore
  }}
  {{Location map~ | USA Alabama
  | lat = 30.268 | long = -87.701 | label = Gulf Shores
  }}
  {{Location map~ | USA Alabama
  | lat = 31.931 | long = -88.459 | label = Melvin
  }}
  {{Location map~ | USA Alabama
  | lat = 32.863 | long = -85.200 | label = Lanett
  }}
}}

See also

Location map templates

Creating new map definitions