Template:Location map data documentation
{{{image|}}}
{{#titleparts:{{FULLPAGENAME}}|3}} is a location map definition used to overlay markers and labels on {{{projection|an equirectangular projection}}} map of {{{name|{{#invoke:Location map}}}. 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 "{{#titleparts:{{FULLPAGENAME}}|1|3}}":
- {{tlx|Location map | {{#titleparts:{{FULLPAGENAME}}|1|3}} | ...}}
- {{tlx|Location map many | {{#titleparts:{{FULLPAGENAME}}|1|3}} | ...}}
- {{tlx|Location map+ | {{#titleparts:{{FULLPAGENAME}}|1|3}} | ...}}
- {{tlx|Location map~ | {{#titleparts:{{FULLPAGENAME}}|1|3}} | ...}}
Map definition
name = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|name}}
- : Name used in the default map caption
image = :File:{{#invoke:Location map
- : The default map image, without "Image:" or "File:"
{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image1}}|
image1 = :File:{{#invoke:Location map
- : An alternative map image, usually a relief map, which can be displayed via the relief or AlternativeMap parameters
}}{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image2}}|
image2 = :File:{{#invoke:Location map
{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image3}}|
image3 = :File:{{#invoke:Location map
}}{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image4}}|
image4 = :File:{{#invoke:Location map
}}
- : Alternative map image{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image3}}|s}} which can be displayed via the AlternativeMap parameter
}}{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|top}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|bottom}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|left}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|right}}|
top = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|top}}
- : Latitude at top edge of map, in decimal degrees
bottom = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|bottom}}
- : Latitude at bottom edge of map, in decimal degrees
left = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|left}}
- : Longitude at left edge of map, in decimal degrees
right = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|right}}
- : Longitude at right edge of map, in decimal degrees
}}{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|x}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|y}}|
x = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|x}}
- : 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
y = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|y}}
- : 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:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|mark}}|
mark = :File:{{#invoke:Location map (File:{{#invoke:Location map)
- : The default mark image to display with this map. This can be overridden by the
mark
parameter in Template:Location map, which would otherwise default to Red pog.svg (8px).
}}{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|marksize}}|
marksize = {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|marksize}}
- : The default mark size (in pixels) for the mark image displayed with this map (should not include
px
, for examplemarksize={{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|marksize}}
, notmarksize={{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|marksize}}px
). This can be overridden by themarksize
parameter in Template:Location map, which would otherwise default to 8.
}}
{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image1}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image2}}|
Alternative map
The {{tl|Location map}}, {{tl|Location map many}}, and {{tl|Location map+}} templates have parameters to specify an alternative map image. {{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image1}}
| The map displayed as image1 can be used with the relief or AlternativeMap parameters.
}} {{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image2}}
| The map{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image3}}|s}} displayed as image2 {{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image3}}|/ image3}} {{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image4}}|/ image4}} can be used with the AlternativeMap parameter.
}} Examples may be found below or in the following:
{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|image1}}|
}}
}}
{{#if:{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|top}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|bottom}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|left}}{{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|right}}|
Precision
{{#if:{{{precision|}}}|{{{precision}}}|
Longitude: from West to East this map definition covers {{#expr: ( {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|right}} - {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|left}} + 360 ) fmod 360 round 4}} degrees.
- At an image width of 200 pixels, that is {{#expr: ( {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|right}} - {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|left}} + 360 ) fmod 360 / 200 round 4}} degrees per pixel.
- At an image width of 1000 pixels, that is {{#expr: ( {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|right}} - {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|left}} + 360 ) fmod 360 / 1000 round 4}} degrees per pixel.
Latitude: from North to South this map definition covers {{#expr: {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|top}} - {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|bottom}} round 4}} degrees.
- At an image height of 200 pixels, that is {{#expr: ( {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|top}} - {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|bottom}} ) / 200 round 4}} degrees per pixel.
- At an image height of 1000 pixels, that is {{#expr: ( {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|top}} - {{#invoke:Location map|data|{{#titleparts:{{FULLPAGENAME}}|1|3}}|bottom}} ) / 1000 round 4}} degrees per pixel.
}}}}
{{#if:{{{examples|}}}|
Examples using location map templates
{{{examples}}}
{{clear}}
}}
See also
{{{see also|}}}
= Location map templates =
- Template:Location map, to display one mark and label using latitude and longitude
- Template:Location map many, to display up to nine marks and labels
- Template:Location map+, to display an unlimited number of marks and labels
= Creating new map definitions =
{{Documentation}}