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

Content deleted Content added
m top: {{High-use}}
 
(23 intermediate revisions by 11 users not shown)
Line 1:
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{High-use}}
 
{{Module:Location map/data/doc|image=[[File:Map of Alaska NA.png|thumb|400px|Map of Alaska (click on map to see larger image)]]|name=the [[U.S. state]] of [[Alaska]]
'''Template:Location map USA Alaska''' is a ___location map definition used to overlay markers and labels on a map of [[Alaska]]. It is used by "[[Template:Location map]]" when invoked with parameter "USA Alaska": <code><nowiki>{{Location map | USA Alaska | ...}}</nowiki></code>. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map image.
|examples=
 
[[Image:{{{{BASEPAGENAME}}|image}}|left|thumb|200px|Location map for {{{{BASEPAGENAME}}|name}}]]
{| class="wikitable" style="font-size:95%;"
|-
! colspan="3" style="background-color:#DDD; color:#000" | Map parameters
|-
! name
| {{{{BASEPAGENAME}}|name}}
| name used in default map caption
|-
! image
| {{{{BASEPAGENAME}}|image}}
| file name of map image, without "Image:" or "File:"
|-
! x
| {{{{BASEPAGENAME}}|x}}
| an expression which returns 0 for the left edge of the map, and 100 for the right edge of the map, where {{{2}}} and {{{3}}} are the degrees latitude and longitude respectively.
|-
! y
| {{{{BASEPAGENAME}}|y}}
| an expression which returns 0 for the top edge of the map, and 100 for the bottom edge of the map, where {{{2}}} and {{{3}}} are the degrees latitude and longitude respectively.
|}
{{clear}}
 
== Usage ==
For a description of the parameters, see {{tl|Location map}} and {{tl|Location map many}}.
 
=== Location map: Eastern hemisphere, Deg/Min/Sec coordinates ===
{{Location map | USA Alaska
| width = 200250
| float = right
| label = Attu Island
| position = right
| caption = Location of [[Attu Island]] in Alaska
| lat_deg = 52 | lat_min= 54 | lat_sec = 09 | lat_dir = N
| lon_deg = 172 | lon_min= 54 | lon_sec = 34 | lon_dir = E
}}
<pre style="width:40em">
{{Location map | USA Alaska
| width = 200250
| float = right
| label = Attu Island
| position = right
| caption = Location of [[Attu Island]] in Alaska
| lat_deg = 52 | lat_min= 54 | lat_sec = 09 | lat_dir = N
| lon_deg = 172 | lon_min= 54 | lon_sec = 34 | lon_dir = E
Line 55 ⟶ 26:
=== Location map: Eastern hemisphere, Decimal coordinates ===
{{Location map | USA Alaska
| width = 200250
| float = right
| label = Attu Island
| position = right
| caption = Location of [[Attu Island]] in Alaska
| lat = 52.9025
| long = 172.909444
}}
<pre style="width:40em">
{{Location map | USA Alaska
| width = 200250
| float = right
| label = Attu Island
| position = right
| caption = Location of [[Attu Island]] in Alaska
| lat = 52.9025
| long = 172.909444
Line 76 ⟶ 45:
{{clear}}
 
=== Location map: Western hemisphere, Deg/Min/Sec coordinates, Relief map ===
{{Location map | USA Alaska
| widthrelief = 200yes
| width = 250
| float = right
| label = Ketchikan
Line 86 ⟶ 56:
| lon_deg = 131 | lon_min= 40 | lon_sec = 24 | lon_dir = W
}}
<pre style="width:40em">
{{Location map | USA Alaska
| widthrelief = 200yes
| width = 250
| float = right
| label = Ketchikan
Line 99 ⟶ 70:
{{clear}}
 
=== Location map: Western hemisphere, Decimal coordinates, AlternativeMap ===
{{Location map | USA Alaska
| AlternativeMap = 800x598 Carte Alaska R3.jpg
| width = 200
| width = 250
| float = right
| label = Ketchikan
Line 109 ⟶ 81:
| long = -131.673333
}}
<pre style="width:40em">
{{Location map | USA Alaska
| AlternativeMap = 800x598 Carte Alaska R3.jpg
| width = 200
| width = 250
| float = right
| label = Ketchikan
Line 122 ⟶ 95:
{{clear}}
 
=== Location map many: Deg/Min/Sec coordinates ===
{{Location map many | USA Alaska
| float = right | width = 200300
| caption = [[Attu Island]] and [[Ketchikan]] in Alaska
| label = Attu Island | label_size = 90 | pos = right
Line 133 ⟶ 106:
| lon2_deg = 131 | lon2_min= 40 | lon2_sec = 24 | lon2_dir = W
}}
<pre style="width:40em">
{{Location map many | USA Alaska
| float = right | width = 200300
| caption = [[Attu Island]] and [[Ketchikan]] in Alaska
| label = Attu Island | label_size = 90 | pos = right
Line 149 ⟶ 122:
=== Location map many: Decimal coordinates ===
{{Location map many | USA Alaska
| float = right | width = 200300
| caption = [[Attu Island]] and [[Ketchikan]] in Alaska
| label = Attu Island | label_size = 90 | pos = right
Line 158 ⟶ 131:
| long2 = -131.673333
}}
<pre style="width:40em">
{{Location map many | USA Alaska
| float = right | width = 200300
| caption = [[Attu Island]] and [[Ketchikan]] in Alaska
| label = Attu Island | label_size = 90 | pos = right
Line 170 ⟶ 143:
}}
</pre>
|see also=
{{clear}}
* [[Module:Location map/data/USA]]
 
}}
== Technical details ==
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
For a flat map which does not cross +/-180 longitude, or +/-90 latitude, the following expressions can be used:
 
<code>x = 100*(''long'' - ''left'')/(''right'' - ''left'')</code><br />
<code>y = 100*(''lat'' - ''top'')/(''bottom'' - ''top'')</code>
 
where ''lat'' and ''long'' are the degrees latitude and longitude respectively. Here, ''top'' and ''bottom'' are the degrees latitude of the top and bottom edges of the map, ''left'' and ''right'' are the degrees latitude of the left and right edges of the map.
 
Things are a bit more complicated when the map crosses +/-180 longitude, and some sort of "module arithmetic" is required. Here, we add 360 if the longitude is less than 180, then use a mapping based on positive coordinates. The following table can be used to check if the expressions are working as desired:
{| class="wikitable"
! ___location !! lat !! long !! (x,y) test !! (x,y) exact
|-
| top/left || 72||172|| ({{#expr:{{{{BASEPAGENAME}}|x|72|172}}}},{{#expr:{{{{BASEPAGENAME}}|y|72|172}}}}) || (0,0)
|-
| top/right || 72||-129|| ({{#expr:{{{{BASEPAGENAME}}|x|72|-129}}}},{{#expr:{{{{BASEPAGENAME}}|y|72|-129}}}}) || (100,0)
|-
| bottom/left || 51||172|| ({{#expr:{{{{BASEPAGENAME}}|x|51|172}}}},{{#expr:{{{{BASEPAGENAME}}|y|51|172}}}}) || (100,0)
|-
| bottom/right || 51||-129|| ({{#expr:{{{{BASEPAGENAME}}|x|51|-129}}}},{{#expr:{{{{BASEPAGENAME}}|y|51|-129}}}}) || (100,100)
|-
| center || 61.5||-158.5|| ({{#expr:{{{{BASEPAGENAME}}|x|61.5|-158.5}}}},{{#expr:{{{{BASEPAGENAME}}|y|61.5|-158.5}}}}) || (50,50)
|}
 
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
{{DEFAULTSORT:Alaska, Location map USA}}
[[Category:UnitedAlaska States state ___location mapstemplates]]
[[Category:Location map templatesmodules crossing the 180th meridian|USA Alaska]]
[[Category:Alaska ___location map modules| ]]
 
[[az:Şablon:Yer xəritəsi Alyaska]]
[[be-x-old:Шаблён:Лякалізацыйная мапа ЗША (Аляска)]]
[[bg:Шаблон:ПК САЩ Аляска]]
[[ca:Plantilla:Location map USA Alaska]]
[[de:Vorlage:Positionskarte USA Alaska]]
[[es:Plantilla:Mapa de localización de Alaska]]
[[eu:Txantiloi:Kokapen mapa/Alaska]]
[[fr:Modèle:Géolocalisation/Alaska]]
[[ko:틀:위치 지도 미국 알래스카 주]]
[[os:Шаблон:ПозКартæ АИШ Аляскæ]]
[[is:Snið:Location map Alaska]]
[[he:תבנית:מפת מיקום/אלסקה]]
[[ka:თარგი:პოზრუკა აშშ ალასკა]]
[[lt:Šablonas:Location map JAV Aliaska]]
[[hu:Sablon:Pozíciós térkép/Alaszka]]
[[ml:ഫലകം:Location map USA Alaska]]
[[nl:Sjabloon:Positiekaart Alaska]]
[[ja:Template:Location map USA Alaska]]
[[pl:Szablon:Mapa lokalizacyjna/USA-AK]]
[[pt:Predefinição:Mapa de localização/Alasca]]
[[ru:Шаблон:ПозКарта США Аляска]]
[[simple:Template:Location map USA Alaska]]
[[szl:Szablon:Mapa lokalizacyjno/USA-AK]]
[[sv:Mall:Kartposition USA Alaska]]
[[uk:Шаблон:Карта розташування Аляска]]
[[zh:Template:Location map USA Alaska]]
 
}}</includeonly>