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

From blackwiki
Jump to navigation Jump to search
blackwiki>Droll
(→‎Examples: tidied up)
m (19 revisions imported)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The locator map definition, '''Template:Location_map_USA_Alabama''', is intended for overlaying markers and labels on similar maps of [[Alabama]].
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 +
{{Module:Location map/data/doc|name=the [[U.S. state]] of [[Alabama]]
 +
|image=[[File:Map of Alabama NA.png|thumb|400px|Map of Alabama (click on map to see larger image)]]
 +
|examples=
 +
=== Location map ===
 +
{{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
 +
}}
 +
<pre style="width:40em">
 +
{{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
 +
}}
 +
</pre>
 +
{{clear}}
  
Some of the related mapping procedures are:
+
=== Location map many ===
 
+
{{Location map many | USA Alabama
* [[Template:Location_map]] - puts 1 symbol/label on the map image;
+
| width   = 200
* [[Template:Location_map_many]] - puts multiple symbols/labels on the map image.
+
| caption  = Locations in Alabama
 
+
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
This template uses the mapping procedure "[[Template:Location_map]]" which must be invoked with parameter "Alabama" to process the options before it uses the template.  Specify each of the individual parameters by using vertical bars:  <nowiki>{{Location map | Alabama | ...}}</nowiki>.
+
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
 
+
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
For map width, omit "px" (width=160) or else map might expand and throw marker across page: the "px" cannot be detected in advance.
+
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
 
+
}}
See: {{tl|Location map}} for description of parameters, or Examples below.
+
<pre style="width:40em">
 
+
{{Location map many | USA Alabama
[[Image:{{Location map Alabama|image}}|left|thumb|200px|{{Location map Alabama|image}}]]
+
| width    = 200
 
+
| caption  = Locations in Alabama
{| class="wikitable"
+
| lat1 = 34.987 | long1 = -86.843 | label1 = Ardmore
! Parameter !! style="text-align:left" | Setting !! style="text-align:left" | Description
+
| lat2 = 30.268 | long2 = -87.701 | label2 = Gulf Shores
|-
+
| lat3 = 31.931 | long3 = -88.459 | label3 = Melvin
| name || {{Location map USA Alabama|name}} || name of location
+
| lat4 = 32.863 | long4 = -85.200 | label4 = Lanett
|-
 
| image || {{Location map USA Alabama|image}} || name of map image
 
|-
 
| top || {{Location map USA Alabama|top}} || latitude at top of map
 
|-
 
| bottom || {{Location map USA Alabama|bottom}} || latitude at bottom of map
 
|-
 
| left || {{Location map USA Alabama|left}} || longitude at map left edge
 
|-
 
| right || {{Location map USA Alabama|right}} || longitude at map right edge
 
|}
 
{{-}}<!-- force separation break -->
 
 
 
==Examples==
 
{{Location map
 
| USA Alabama
 
| 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
 
 
}}
 
}}
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.
 
  
<!-- ------------------------- 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.10
 
| long = -88.64
 
| 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.10</nowiki>
 
:<nowiki>| long = -88.64</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.10
 
| long = -84.85
 
| background = #33DD44 <!--green-->
 
| float = right
 
| width = 160
 
 
}}
 
}}
Example for green "right edge" at side:
+
<includeonly>
<code>
+
<!-- Categories go here, and interwikis go in Wikidata -->
:<nowiki>{{Location map</nowiki>
+
{{DEFAULTSORT:Alabama, Location map USA}}
:<nowiki>| USA Alabama</nowiki>
+
[[Category:United States state location map templates]]
:<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.10</nowiki>
 
:<nowiki>| long = -84.85</nowiki>
 
:<nowiki>| background = #33DD44 <!--green--></nowiki>
 
:<nowiki>| float = right</nowiki>
 
:<nowiki>| width = 160</nowiki>
 
:<nowiki>}}</nowiki></code>
 
  
[[de:Vorlage:Positionskarte USA Alabama]]
+
</includeonly>
<!-- [[ru:Шаблон:ПозКарта США алабаmа]] -->
 
</noinclude>
 

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