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

Content deleted Content added
See also: Merged
update documentation
Line 1:
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page and interwikis go in Wikidata. -->
 
[[File:Map of Alabama NA.png|thumb|400px|Map of Alabama (click on map to see larger image)]]
 
'''Template:Location map 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 ==
Line 26 ⟶ 27:
* <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}}|
 
Line 63 ⟶ 60:
{{!}}}
}}
{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
== Examples using ___location map templates ==
== Precision ==
[[Longitude]]: from West to East this map definition covers {{#expr: -( {{{{BASEPAGENAME}}|left}} - {{{{BASEPAGENAME}}|right}} ) round 4}} degrees.
* At an image width of 200 [[pixel]]s, that is {{#expr: -( {{{{BASEPAGENAME}}|left}} - {{{{BASEPAGENAME}}|right}} ) / 200 round 4}} degrees per pixel.
* At an image width of 1000 pixels, that is {{#expr: -( {{{{BASEPAGENAME}}|left}} - {{{{BASEPAGENAME}}|right}} ) / 1000 round 4}} degrees per pixel.
 
[[Latitude]]: from North to South this map definition covers {{#expr: {{{{BASEPAGENAME}}|top}} - {{{{BASEPAGENAME}}|bottom}} round 4}} degrees.
{{Location map
* At an image height of 200 pixels, that is {{#expr: ( {{{{BASEPAGENAME}}|top}} - {{{{BASEPAGENAME}}|bottom}} ) / 200 round 4}} degrees per pixel.
| USA Alabama
* At an image height of 1000 pixels, that is {{#expr: ( {{{{BASEPAGENAME}}|top}} - {{{{BASEPAGENAME}}|bottom}} ) / 1000 round 4}} degrees per pixel.
| label = Huntsville | position = left
| label_size = 90 <!-- percent 0-900% -->
| caption = Show "Huntsville" on map
| lat_deg = 34 | lat_min = 42.8 | lat_dir = N
| lon_deg = 86 | lon_min = 35.2 | lon_dir = W
| background = #FFFF99
| float = right | width = 160
}}
== Examples using ___location map templates ==
Example labeling "[[Huntsville, Alabama|Huntsville]]":
<code>
:<nowiki>{{Location map</nowiki>
:<nowiki>| USA Alabama</nowiki>
:<nowiki>| label = Huntsville | position = left</nowiki>
:<nowiki>| label_size = 90 <!--percent 0-900%--></nowiki>
:<nowiki>| caption = Show "Huntsville" on map</nowiki>
:<nowiki>| lat_deg = 34 </nowiki>&nbsp;<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>
 
=== Location map ===
: Note that both lon_deg and lon_min are negative numbers, for the Western Hemisphere.
{{Location map | USA Alabama
 
| width = 200
<!-- ------------------------- Showing Mobile -->
| lat_deg = 32 | lat_min = 21 | lat_sec = 42 | lat_dir = N
{{Location map
| lon_deg = 086 | lon_min = 16 | lon_sec = 45 | lon_dir = W
| USA Alabama
| label = Mobile | position = topMontgomery
| 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 style="width:40em">
Example for orange "[[Mobile, Alabama|Mobile]]" at bottom:
{{Location map | USA Alabama
<code>
| width = 200
:<nowiki>{{Location map</nowiki>
| lat_deg = 32 | lat_min = 21 | lat_sec = 42 | lat_dir = N
:<nowiki>| USA Alabama</nowiki>
| lon_deg = 086 | lon_min = 16 | lon_sec = 45 | lon_dir = W
:<nowiki>| label = Mobile | position = top</nowiki>
| label = Montgomery
:<nowiki>| label_size = 90 <!-- 0-900%--></nowiki>
}}
:<nowiki>| caption = Show "Mobile" on map</nowiki>
</pre>
:<nowiki>| lat_deg = 30 </nowiki>&nbsp;<nowiki>| lat_min = 40.8 | lat_dir = N</nowiki>
{{clear}}
:<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 many ===
<!-- ------------------------- Showing Left edge -->
{{Location map many | USA Alabama
| width = 200
| USA Alabama
| caption = Locations in Alabama
| label = left edge | position = right
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
| label_size = 90 <!-- percent 0-900% -->
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
| caption = Show "left edge" on map
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
| lat = 31.1
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
| long = -88.7
| background = #33DD44 <!--green-->
| float = right
| width = 160
}}
<pre style="width:40em">
Example for green "left edge" at side:
{{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 = left edge | position = right</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 "left edge" on map</nowiki>
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
:<nowiki>| lat = 31.1</nowiki>
}}
:<nowiki>| long = -88.7</nowiki>
</pre>
:<nowiki>| background = #33DD44 <!--green--></nowiki>
{{clear}}
:<nowiki>| float = right</nowiki>
:<nowiki>| width = 160</nowiki>
:<nowiki>}}</nowiki></code>
 
=== Location map+ ===
<!-- ------------------------- Showing Right edge -->
{{Location map+ | USA Alabama
| width = 200
| USA Alabama
| caption = Locations in Alabama
| label = right edge | position = left
| places =
| label_size = 90 <!-- percent 0-900% -->
{{Location map~ | USA Alabama
| caption = Show map "right edge"
| lat = 34.987 | long = -86.843 | label = Ardmore
| lat = 31.1
}}
| long = -84.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">
{{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
}}
}}
</pre>
Example for green "right edge" at side:
{{clear}}
<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]]
* [[Template:Geobox locator Alabama]], a ___location map definition used by {{tl|Geobox}} and other templates in [[:Category:Geobox]]
 
; Location map templates
Line 182 ⟶ 161:
{{Location map/doc/See also infobox templates}}
<includeonly>
<!-- Categories go here, and interwikis go in Wikidata -->
{{DEFAULTSORT:Alabama, Location map USA}}
[[Category:United States state ___location maps]]