Module:Location map/data/Russia Chukotka Autonomous Okrug/doc: Difference between revisions

Content deleted Content added
modulo
 
(15 intermediate revisions by 6 users not shown)
Line 1:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Documentation subpage}}
{{Module:Location map/data/doc
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
|examples =
 
'''Template:Location map Russia Chukotka Autonomous Okrug''' is a ___location map definition used to overlay markers and labels on an ''[[equirectangular projection]]'' map of the [[Chukotka Autonomous Okrug]] in [[Russia]]. It is used by "[[Template:Location map]]" when invoked with parameter "Russia Chukotka Autonomous Okrug": <code><nowiki>{{Location map | Russia Chukotka Autonomous Okrug | ...}}</nowiki></code>. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map image.
 
[[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 evaluates as 0 along the left edge of the map, and 100 along the right edge of the map, where {{{2}}} and {{{3}}} are the degrees latitude and longitude respectively.
|-
! y
| {{{{BASEPAGENAME}}|y}}
| an expression which evaluates as 0 along the top edge of the map, and 100 along 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 | Russia Chukotka Autonomous Okrug
Line 179 ⟶ 151:
</pre>
{{clear}}
==| Seesee also ==
 
* [[TemplateModule:Location map /data/Russia]]
== Technical details ==
}}<includeonly>
For a map using an [[equirectangular projection]] which does not cross +/-180 longitude, or +/-90 latitude, the following expressions can be used:
<!-- Add categories here -->
 
[[Category:Federal subjects of Russia ___location map modules|Chukotka Autonomous Okrug]]
<code>x = 100*(''long'' - ''left'')/(''right'' - ''left'')</code><br />
[[Category:Location map templatesmodules crossing the 180th meridian|Russia Chukotka Autonomous Okrug]]
<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 "modulo arithmetic" is required. Here, we add 360 if the longitude is less than 0, 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.767067||156.69525|| ({{#expr:{{{{BASEPAGENAME}}|x|72.767067|156.69525}}}},{{#expr:{{{{BASEPAGENAME}}|y|72.767067|156.69525}}}}) || (0,0)
|-
| top/right || 72.767067||-168.170471|| ({{#expr:{{{{BASEPAGENAME}}|x|72.767067|-168.170471}}}},{{#expr:{{{{BASEPAGENAME}}|y|72.767067|-168.170471}}}}) || (100,0)
|-
| bottom/left || 61.662832||156.69525|| ({{#expr:{{{{BASEPAGENAME}}|x|61.662832|156.69525}}}},{{#expr:{{{{BASEPAGENAME}}|y|61.662832|156.69525}}}}) || (100,0)
|-
| bottom/right || 61.662832||-168.170471|| ({{#expr:{{{{BASEPAGENAME}}|x|61.662832|-168.170471}}}},{{#expr:{{{{BASEPAGENAME}}|y|61.662832|-168.170471}}}}) || (100,100)
|-
| center || 67.2149495||174.2623895|| ({{#expr:{{{{BASEPAGENAME}}|x|67.2149495|174.2623895}}}},{{#expr:{{{{BASEPAGENAME}}|y|67.2149495|174.2623895}}}}) || (50,50)
|}
 
== See also ==
* [[Template:Location map Russia]]
* [[Template:Location map Russia (equirectangular)]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Russia ___location map templates]]
[[Category:Location map templates crossing 180th meridian]]
 
[[de:Vorlage:Positionskarte Russland Autonomer Kreis der Tschuktschen]]
[[fr:Modèle:Géolocalisation/District autonome de Tchoukotka]]
[[os:Шаблон:ПозКартæ Уæрæсе Чукоткæйы автономон зылд]]
[[lt:Šablonas:Location map Čiukčių autonominė apygarda]]
[[nl:Sjabloon:Positiekaart Rusland Tsjoekotka]]
[[nn:Mal:Kartposisjon Tsjukotka]]
[[ru:Шаблон:ПозКарта Россия Чукотский автономный округ]]
</includeonly>