<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{Documentation subpage}}
{{High-use}}
<!-- 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 | ...}}
| lon_deg = 086 | lon_min = 16 | lon_sec = 45 | lon_dir = W
* {{tlx|Location map many | USA Alabama | ...}}
| label = Montgomery
* {{tlx|Location map+ | USA Alabama | ...}}
* {{tlx|Location map~ | USA Alabama | ...}}
== 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
}}
<pre style="width:40em">
{{#if:{{{{BASEPAGENAME}}|image1}}|
{{Location map | USA Alabama
== Alternative map ==
| width = 200
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:
| 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
* [[Template:Location map#Relief parameter]]
* [[Template:Location map#AlternativeMap parameter]]
{{!}}
* [[Template:Location map+/relief]]
* [[Template:Location map+/AlternativeMap]]
{{!}}}
}}
</pre>
== Examples using ___location map templates ==
{{clear}}
{{=== Location map many ===
{{Location map many | USA Alabama
| labelwidth = Huntsville | position = left200
| caption = Locations in Alabama
| label_size = 90 <!-- percent 0-900% -->
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
| caption = Show "Huntsville" on map
| lat_deglat2 = 3430.268 | lat_minlong2 = 42-87.8701 | lat_dirlabel2 = NGulf Shores
| lon_deglat3 = 8631.931 | lon_minlong3 = 35-88.2459 | lon_dirlabel3 = WMelvin
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
| background = #FFFF99
| float = right | width = 160
}}
<pre style="width:40em">
Example labeling "[[Huntsville, Alabama|Huntsville]]":
{{Location map many | USA Alabama
<code>
| width = 200
:<nowiki>{{Location map</nowiki>
| caption = Locations in Alabama
:<nowiki>| USA Alabama</nowiki>
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
:<nowiki>| label = Huntsville | position = left</nowiki>
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
:<nowiki>| label_size = 90 <!--percent 0-900%--></nowiki>
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
:<nowiki>| caption = Show "Huntsville" on map</nowiki>
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
:<nowiki>| lat_deg = 34 </nowiki> <nowiki>| lat_min = 42.8 | lat_dir = N</nowiki>
:<nowiki>| lon_deg = 86 | lon_min = 35.2 | lon_dir = W</nowiki>
:<nowiki>| background = #FFFF99</nowiki>
:<nowiki>| float = right</nowiki>
:<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
| USA Alabama
| label = Mobile | position = top
| label_size = 90 <!-- percent 0-900% -->
| caption = Show "Mobile" on map
| lat_deg = 30 | lat_min = 40.8 | lat_dir = N
| lon_deg = 88 | lon_min = 6.2 | lon_dir = W
| background = #FFCC66 <!--orange-->
| float = right
| width = 160
| AlternativeMap = <!-- none (use default map) -->
}}
</pre>
Example for orange "[[Mobile, Alabama|Mobile]]" at bottom:
{{clear}}
<code>
:<nowiki>{{Location map</nowiki>
:<nowiki>| USA Alabama</nowiki>
:<nowiki>| label = Mobile | position = top</nowiki>
:<nowiki>| label_size = 90 <!-- 0-900%--></nowiki>
:<nowiki>| caption = Show "Mobile" on map</nowiki>
:<nowiki>| lat_deg = 30 </nowiki> <nowiki>| lat_min = 40.8 | lat_dir = N</nowiki>
:<nowiki>| lon_deg = 88 | lon_min = 6.2 | lon_dir = W</nowiki>
:<nowiki>| background = #FFCC66 <!--orange--></nowiki>
:<nowiki>| float = right</nowiki>
:<nowiki>| width = 160 <!--DON'T add "px"--></nowiki>
:<nowiki>| AlternativeMap = <!-- none (default)--></nowiki>
:<nowiki>}}</nowiki></code>
=== Location map+ ===
<!-- ------------------------- Showing Left edge -->
{{Location map+ | USA Alabama
| width = 200
| USA Alabama
| caption = Locations in Alabama
| label = left edge | position = right
| places =
| label_size = 90 <!-- percent 0-900% -->
{{Location map~ | USA Alabama
| caption = Show "left edge" on map
| lat = 34.987 | long = -86.843 | label = Ardmore
| lat = 31.1
}}
| long = -88.7
{{Location map~ | USA Alabama
| background = #33DD44 <!--green-->
| lat = 30.268 | long = -87.701 | label = Gulf Shores
| float = right
}}
| width = 160
{{Location map~ | USA Alabama
| lat = 31.931 | long = -88.459 | label = Melvin
}}
{{Location map~ | USA Alabama
| lat = 32.863 | long = -85.200 | label = Lanett
}}
}}
<pre style="width:40em">
Example for green "left edge" at side:
{{Location map+ | USA Alabama
<code>
| width = 200
:<nowiki>{{Location map</nowiki>
| caption = Locations in Alabama
:<nowiki>| USA Alabama</nowiki>
| places =
:<nowiki>| label = left edge | position = right</nowiki>
{{Location map~ | USA Alabama
:<nowiki>| label_size = 90 <--percent 0-900%--></nowiki>
| lat = 34.987 | long = -86.843 | label = Ardmore
:<nowiki>| caption = Show "left edge" on map</nowiki>
}}
:<nowiki>| lat = 31.1</nowiki>
{{Location map~ | USA Alabama
:<nowiki>| long = -88.7</nowiki>
| lat = 30.268 | long = -87.701 | label = Gulf Shores
:<nowiki>| background = #33DD44 <!--green--></nowiki>
}}
:<nowiki>| float = right</nowiki>
{{Location map~ | USA Alabama
:<nowiki>| width = 160</nowiki>
| lat = 31.931 | long = -88.459 | label = Melvin
:<nowiki>}}</nowiki></code>
}}
{{Location map~ | USA Alabama
<!-- ------------------------- Showing Right edge -->
| lat = 32.863 | long = -85.200 | label = Lanett
{{Location map
}}
| USA Alabama
}}
| label = right edge | position = left
</pre>
| label_size = 90 <!-- percent 0-900% -->
|see also=
| caption = Show map "right edge"
* [[Module:Location map/data/USA]]
| 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>
<!-- Categories go here, and interwikis go in Wikidata -->
{{DEFAULTSORT:Alabama, Location map USA}}
[[Category:UnitedAlabama States___location state ___locationmap mapsmodules]]
</includeonly>
|