Module:Location map/data/Russia Chukotka Autonomous Okrug/doc: Difference between revisions
Content deleted Content added
created documentation with examples |
Plastikspork (talk | contribs) Update |
||
Line 17:
| file name of map image, without "Image:" or "File:"
|-
!
| {{{{BASEPAGENAME}}|
| 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.
|-
!
| {{{{BASEPAGENAME}}|
| 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}}
Line 130 ⟶ 118:
| lat = 66.15944
| long = -169.80917
}}▼
}}
</pre>
Line 217 ⟶ 180:
{{clear}}
== Technical details ==
For a map using an [[equirectangular projection]] 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 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 ==
|