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

Content deleted Content added
Jackmcbarn (talk | contribs)
Jackmcbarn (talk | contribs)
update for module
Line 1:
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{#invoke:Location map/info|main}}
 
[[File:Map of Alabama NA.png|thumb|400px|Map of Alabama (click on map to see larger image)]]
Line 14:
 
== Map definition ==
* <tt>'''name''' = {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|name}}</tt>
*: Name used in the default map caption
 
* <tt>'''image''' = [[:File:{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image}}|{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image}}]]</tt>
*: The default map image, without "Image:" or "File:"
{{#if:{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image1}}|
 
* <tt>'''image1''' = [[:File:{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image1}}|{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image1}}]]</tt>
*: An alternative map image, usually a relief map, can be displayed via the ''relief'' or ''AlternativeMap'' parameters
}}{{#if:{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image2}}|
 
* <tt>'''image2''' = [[:File:{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image2}}|{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image2}}]]</tt>
*: A second alternative map image, can be displayed via the ''AlternativeMap'' parameter only
}}{{#if:{{#invoke:Data|main|Location map/data/USA Alabama|top}}{{#invoke:Data|main|Location map/data/USA Alabama|bottom}}{{#invoke:Data|main|Location map/data/USA Alabama|left}}{{#invoke:Data|main|Location map/data/USA Alabama|right}}|
}}{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
 
* <tt>'''top''' = {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|top}}</tt>
*: [[Latitude]] at top edge of map, in [[decimal degrees]]
 
* <tt>'''bottom''' = {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|bottom}}</tt>
*: Latitude at bottom edge of map, in decimal degrees
 
* <tt>'''left''' = {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|left}}</tt>
*: [[Longitude]] at left edge of map, in decimal degrees
 
* <tt>'''right''' = {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|right}}</tt>
*: Longitude at right edge of map, in decimal degrees
}}{{#if:{{#invoke:Data|main|Location map/data/USA Alabama|x}}{{#invoke:Data|main|Location map/data/USA Alabama|y}}|
}}{{#if:{{{{BASEPAGENAME}}|x}}{{{{BASEPAGENAME}}|y}}|
 
* <tt>'''x''' = {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|x}}</tt>
*: An expression to calculate a ___location on the map via its [[longitude]]; evaluates as 0 along the left edge and 100 along the right edge
 
* <tt>'''y''' = {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|y}}</tt>
*: An expression to calculate a ___location on the map via its [[latitude]]; evaluates as 0 along the top edge and 100 along the bottom edge
}}
{{#if:{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image1}}|
== Alternative map ==
The map defined as '''image1''' (<tt>{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image1}}</tt>) can be displayed by using the ''relief'' or ''AlternativeMap'' parameters in {{tl|Location map}}, {{tl|Location map many}} and {{tl|Location map+}}. {{#if:{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image2}}| The map defined as '''image2''' (<tt>{{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|image2}}</tt>) 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:
{{{!}}
{{!}}
Line 60:
{{!}}}
}}
{{#if:{{#invoke:Data|main|Location map/data/USA Alabama|top}}{{#invoke:Data|main|Location map/data/USA Alabama|bottom}}{{#invoke:Data|main|Location map/data/USA Alabama|left}}{{#invoke:Data|main|Location map/data/USA Alabama|right}}|
{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
== Precision ==
[[Longitude]]: from West to East this map definition covers {{#expr: -( {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|left}} - {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|right}} ) round 4}} degrees.
* At an image width of 200 [[pixel]]s, that is {{#expr: -( {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|left}} - {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|right}} ) / 200 round 4}} degrees per pixel.
* At an image width of 1000 pixels, that is {{#expr: -( {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|left}} - {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|right}} ) / 1000 round 4}} degrees per pixel.
 
[[Latitude]]: from North to South this map definition covers {{#expr: {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|top}} - {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|bottom}} round 4}} degrees.
* At an image height of 200 pixels, that is {{#expr: ( {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|top}} - {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|bottom}} ) / 200 round 4}} degrees per pixel.
* At an image height of 1000 pixels, that is {{#expr: ( {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|top}} - {{{{BASEPAGENAME}}#invoke:Data|main|Location map/data/USA Alabama|bottom}} ) / 1000 round 4}} degrees per pixel.
}}
== Examples using ___location map templates ==