Module:Location map/data/100x100/doc: Difference between revisions

Content deleted Content added
Removed 4 sitelinks migrated to an item on Wikidata
 
(6 intermediate revisions by 3 users not shown)
Line 1:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
This map definition, '''Template:Location_map_100x100''', is intended for overlaying markers/labels on any specified image, using map coordinates ranging from 0-100.0 for [[latitude]] or [[longitude]]. See the technical design below, under: [[#Design issues]].<br/>
Some of the related mapping procedures are:
Line 9 ⟶ 7:
 
All mapping templates use similar parameters (see ''[[#Examples|Examples]]''):
<div style="font-family: monospace;">
<code>
:* 100x100 - the first parameter is always the map name
:* AlternativeMap - name of image (omit "Image:")
:* caption=text - caption text along bottom of image
:* width=250 - for image width (omit "px" or image will span page)
:* label - movable label (can be padded "&amp;nbsp;XX&amp;nbsp;YY&amp;nbsp;")
Line 18 ⟶ 16:
:* background - color of label (such as: darkorange or #4499DD)
:* position=right - (or left, top, bottom) position of label at marker
:* lat =55.00 - for latitude 0-100.0 (higher towards top)
:* long=45.00 - for longitude 0-100.0 (higher towards right)
:* mark &nbsp; &nbsp; - name of image for marker symbol (omit "Image:")
:* marksize - size of image for marker symbol (default: 8px, 1px=none)
:* float=right (or left, center) - position of map formatted on page
</codediv>
Some common label background colors are: <small>#</small>CCCC55 for <span style="color:#CCCC55">'''dim yellow'''</span>,
::* <small>#</small>44EE44 for <span style="color:#44EE44">'''lime green'''</span>, <small>#</small>BBBBBB for <span style="color:#BBBBBB">'''gray'''</span>,
Line 29 ⟶ 27:
::* PaleGreen for <span style="color:PaleGreen">'''pale green'''</span>, <span style="color:PaleTurquoise">'''PaleTurquoise'''</span>, <span style="color:DarkOrange">'''DarkOrange'''</span>, etc.
::* By default, the label is ''transparent'' overwriting the image.
For small lettering use label_size=80, for tiny words use 55. Note that the words in the label will wrap unless using "nbsp": <small>DO&amp;nbsp;NOT&amp;nbsp;WRAP</small>.
 
When specifying image "width=270" be sure to ''OMIT'' "px" (which causes the image to span the width of the screen) because "px" cannot (yet) be detected by the (new) MediaWiki language which processes those mapping templates.
Line 50 ⟶ 48:
| float=right <!--(or left, center) - position of map-->
}}
<codediv style="font-family: monospace;"><!--indent next line by 1 space to trigger quote-box -->
<nowiki>{{</nowiki>Location map | 100x100
| caption = Example on blank image
Line 64 ⟶ 62:
| float=right <!--left/center-->
}}
</codediv>
 
{{Location_map | 100x100
Line 80 ⟶ 78:
| float=right <!--(or left, center) - position of map-->
}}
<codediv style="font-family: monospace;"><!--indent next line by 1 space to trigger quote-box -->
<nowiki>{{</nowiki>Location map | 100x100
| AlternativeMap = Gold star on blue.gif
Line 95 ⟶ 93:
| float=right <!--left/center-->
}}
</codediv>
 
==Other options==
Line 103 ⟶ 101:
::* Over latitude= 101.0 will push a label off-map to the top.
For templates that restrict coordinates, expand the ''minutes'' field: lat_deg=100.0 but lat_min=120 yielding a combined 102 degrees (60 minutes = 1 degree).
 
==Design issues==
Each of the mapper templates named as "Location_map_XX" (such as "Location_map_100x100") contains a map-image name, latitude range, and longitude range, as the details hidden by data [[encapsulation (computer science)]]. Hence, each of those templates is not a "fork" of {{tl|Location map}} but instead, they are [[accessor function]]s which access the map-border coordinates as shared data, rather than being repeated data in each article using {{tl|Location map Italy}}. If Italy officially changes its map borders, then only that one mapper template need be changed, and only those Italy-related articles will be reformatted. The total of 20,000+ articles using {Location_map} will NOT be reformatted when someone updates each particular "Location_map_XX" and so the impact on Wikipedia server work is reduced, as roughly 450 times faster, by having 450 separate mapper templates.
 
==See also==
* [[Template:Superimpose]] - to label an image without a border box
* [[Module:Location map/data/USA]] - for mapping the "lower 48" states
 
<includeonly>
<!-- CATEGORIES HERE, THANKS -->
[[Category:Graphics templates]]
[[Category:Location map modules|100x100]]
</includeonly><noinclude>
[[Category:Module documentation pages]]
</noinclude>