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

From blackwiki
Jump to navigation Jump to search
blackwiki>Plastikspork
(→‎See also: Merged)
blackwiki>Zyxw
(update documentation)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
+
<!-- Categories 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)]]
 
[[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 [[Alabama]]. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map 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 ==
 
== Usage ==
Line 26: Line 27:
 
* <tt>'''image2''' = [[:File:{{{{BASEPAGENAME}}|image2}}|{{{{BASEPAGENAME}}|image2}}]]</tt>
 
* <tt>'''image2''' = [[:File:{{{{BASEPAGENAME}}|image2}}|{{{{BASEPAGENAME}}|image2}}]]</tt>
 
*: A second alternative map image, can be displayed via the ''AlternativeMap'' parameter only
 
*: 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}}|
 
}}{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
  
Line 62: Line 59:
 
* [[Template:Location map+/AlternativeMap]]
 
* [[Template:Location map+/AlternativeMap]]
 
{{!}}}
 
{{!}}}
 +
}}
 +
{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
 +
== 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.
 +
* At an image height of 200 pixels, that is {{#expr: ( {{{{BASEPAGENAME}}|top}} - {{{{BASEPAGENAME}}|bottom}} ) / 200 round 4}} degrees per pixel.
 +
* At an image height of 1000 pixels, that is {{#expr: ( {{{{BASEPAGENAME}}|top}} - {{{{BASEPAGENAME}}|bottom}} ) / 1000 round 4}} degrees per pixel.
 
}}
 
}}
 
== Examples using location map templates ==
 
== Examples using location map templates ==
  
{{Location map
+
=== Location map ===
| USA Alabama
+
{{Location map | USA Alabama
| label = Huntsville | position = left
+
| width  = 200
| label_size = 90 <!-- percent 0-900% -->
+
| lat_deg =  32 | lat_min = 21 | lat_sec = 42 | lat_dir = N
| caption = Show "Huntsville" on map
+
| lon_deg = 086 | lon_min = 16 | lon_sec = 45 | lon_dir = W
| lat_deg = 34 | lat_min = 42.8 | lat_dir = N
+
| label  = Montgomery
| lon_deg = 86 | lon_min = 35.2 | lon_dir = W
+
}}
| background = #FFFF99
+
<pre style="width:40em">
| float = right | width = 160
+
{{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
 
}}
 
}}
Example labeling "[[Huntsville, Alabama|Huntsville]]":
+
</pre>
<code>
+
{{clear}}
:<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>
 
  
: Note that both lon_deg and lon_min are negative numbers, for the Western Hemisphere.
+
=== Location map many ===
 
+
{{Location map many | USA Alabama
<!-- ------------------------- Showing Mobile -->
+
| width    = 200
{{Location map
+
| caption  = Locations in Alabama
| USA Alabama
+
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
| label = Mobile | position = top
+
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
| label_size = 90 <!-- percent 0-900% -->
+
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
| caption = Show "Mobile" on map
+
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
| lat_deg = 30 | lat_min = 40.8 | lat_dir = N
+
}}
| lon_deg = 88 | lon_min = 6.2 | lon_dir = W
+
<pre style="width:40em">
| background = #FFCC66 <!--orange-->
+
{{Location map many | USA Alabama
| float = right
+
| width    = 200
| width = 160
+
| caption  = Locations in Alabama
| AlternativeMap = <!-- none (use default map) -->
+
| 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
 
}}
 
}}
Example for orange "[[Mobile, Alabama|Mobile]]" at bottom:
+
</pre>
<code>
+
{{clear}}
:<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>&nbsp;<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>
 
  
<!-- ------------------------- Showing Left edge -->
+
=== Location map+ ===
{{Location map
+
{{Location map+ | USA Alabama
| USA Alabama
+
| width  = 200
| label = left edge | position = right
+
| caption = Locations in Alabama
| label_size = 90 <!-- percent 0-900% -->
+
| places  =
| caption = Show "left edge" on map
+
  {{Location map~ | USA Alabama
| lat = 31.1
+
  | lat = 34.987 | long = -86.843 | label = Ardmore
| long = -88.7
+
  }}
| background = #33DD44 <!--green-->
+
  {{Location map~ | USA Alabama
| float = right
+
  | lat = 30.268 | long = -87.701 | label = Gulf Shores
| 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
 +
  }}
 
}}
 
}}
Example for green "left edge" at side:
+
<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 = left edge | position = right</nowiki>
+
| places  =
:<nowiki>| label_size = 90 <--percent 0-900%--></nowiki>
+
  {{Location map~ | USA Alabama
:<nowiki>| caption = Show "left edge" on map</nowiki>
+
  | lat = 34.987 | long = -86.843 | label = Ardmore
:<nowiki>| lat = 31.1</nowiki>
+
  }}
:<nowiki>| long = -88.7</nowiki>
+
  {{Location map~ | USA Alabama
:<nowiki>| background = #33DD44 <!--green--></nowiki>
+
  | lat = 30.268 | long = -87.701 | label = Gulf Shores
:<nowiki>| float = right</nowiki>
+
  }}
:<nowiki>| width = 160</nowiki>
+
  {{Location map~ | USA Alabama
:<nowiki>}}</nowiki></code>
+
  | lat = 31.931 | long = -88.459 | label = Melvin
 
+
  }}
<!-- ------------------------- Showing Right edge -->
+
  {{Location map~ | USA Alabama
{{Location map
+
  | lat = 32.863 | long = -85.200 | label = Lanett
| 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:
+
</pre>
<code>
+
{{clear}}
:<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 ==
 
== See also ==
 
* [[Template:Location map USA]]
 
* [[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
 
; Location map templates
Line 182: Line 161:
 
{{Location map/doc/See also infobox templates}}
 
{{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 maps]]
  
 
</includeonly>
 
</includeonly>

Revision as of 08:13, 24 June 2013

File:Map of Alabama NA.png
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

These definitions are used by the following templates when invoked with parameter "USA Alabama":

Map definition

Alternative map

The map defined as image1 (Template:Location map/data/USA Alabama) 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/USA Alabama) 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:

Precision

Longitude: from West to East this map definition covers Expression error: Unrecognized punctuation character "[". degrees.

  • At an image width of 200 pixels, that is Expression error: Unrecognized punctuation character "[". degrees per pixel.
  • At an image width of 1000 pixels, that is Expression error: Unrecognized punctuation character "[". degrees per pixel.

Latitude: from North to South this map definition covers Expression error: Unrecognized punctuation character "[". degrees.

  • At an image height of 200 pixels, that is Expression error: Unrecognized punctuation character "[". degrees per pixel.
  • At an image height of 1000 pixels, that is Expression error: Unrecognized punctuation character "[". 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
Infobox templates incorporating (passing values to) the Location map template
List