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

From blackwiki
Jump to navigation Jump to search
blackwiki>Frietjes
blackwiki>Anomalocaris
(<code>...</code> can't wrap multiple blocks, but <div style="font-family: monospace;">...</div> can)
Line 7: Line 7:
  
 
All mapping templates use similar parameters (see ''[[#Examples|Examples]]''):
 
All mapping templates use similar parameters (see ''[[#Examples|Examples]]''):
<code>
+
<div style="font-family: monospace;">
:* 100x100   - the first parameter is always the map name
+
:* 100x100 - the first parameter is always the map name
 
:* AlternativeMap - name of image (omit "Image:")
 
:* AlternativeMap - name of image (omit "Image:")
:* caption=text   - caption text along bottom of image
+
:* caption=text - caption text along bottom of image
 
:* width=250 - for image width (omit "px" or image will span page)
 
:* 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;")
 
:* label - movable label (can be padded "&amp;nbsp;XX&amp;nbsp;YY&amp;nbsp;")
Line 16: Line 16:
 
:* background - color of label (such as: darkorange or #4499DD)
 
:* background - color of label (such as: darkorange or #4499DD)
 
:* position=right - (or left, top, bottom) position of label at marker
 
:* position=right - (or left, top, bottom) position of label at marker
:* lat =55.00 - for latitude 0-100.0 (higher towards top)
+
:* lat =55.00 - for latitude 0-100.0 (higher towards top)
:* long=45.00 - for longitude 0-100.0 (higher towards right)
+
:* long=45.00 - for longitude 0-100.0 (higher towards right)
 
:* mark &nbsp; &nbsp; - name of image for marker symbol (omit "Image:")
 
:* mark &nbsp; &nbsp; - name of image for marker symbol (omit "Image:")
 
:* marksize - size of image for marker symbol (default: 8px, 1px=none)
 
:* marksize - size of image for marker symbol (default: 8px, 1px=none)
 
:* float=right (or left, center) - position of map formatted on page
 
:* float=right (or left, center) - position of map formatted on page
</code>
+
</div>
 
Some common label background colors are: <small>#</small>CCCC55 for <span style="color:#CCCC55">'''dim yellow'''</span>,
 
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>,
 
::* <small>#</small>44EE44 for <span style="color:#44EE44">'''lime green'''</span>, <small>#</small>BBBBBB for <span style="color:#BBBBBB">'''gray'''</span>,
Line 27: Line 27:
 
::* PaleGreen for <span style="color:PaleGreen">'''pale green'''</span>, <span style="color:PaleTurquoise">'''PaleTurquoise'''</span>, <span style="color:DarkOrange">'''DarkOrange'''</span>, etc.
 
::* 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.
 
::* 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>.
+
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.
 
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 48: Line 48:
 
| float=right <!--(or left, center) - position of map-->
 
| float=right <!--(or left, center) - position of map-->
 
}}
 
}}
<code><!--indent next line by 1 space to trigger quote-box -->
+
<div style="font-family: monospace;"><!--indent next line by 1 space to trigger quote-box -->
 
  <nowiki>{{</nowiki>Location map | 100x100
 
  <nowiki>{{</nowiki>Location map | 100x100
 
  | caption = Example on blank image
 
  | caption = Example on blank image
Line 62: Line 62:
 
  | float=right <!--left/center-->
 
  | float=right <!--left/center-->
 
  }}
 
  }}
</code>
+
</div>
  
 
{{Location_map | 100x100
 
{{Location_map | 100x100
Line 78: Line 78:
 
| float=right <!--(or left, center) - position of map-->
 
| float=right <!--(or left, center) - position of map-->
 
}}
 
}}
<code><!--indent next line by 1 space to trigger quote-box -->
+
<div style="font-family: monospace;"><!--indent next line by 1 space to trigger quote-box -->
 
  <nowiki>{{</nowiki>Location map | 100x100
 
  <nowiki>{{</nowiki>Location map | 100x100
 
  | AlternativeMap = Gold star on blue.gif
 
  | AlternativeMap = Gold star on blue.gif
Line 93: Line 93:
 
  | float=right <!--left/center-->
 
  | float=right <!--left/center-->
 
  }}
 
  }}
</code>
+
</div>
  
 
==Other options==
 
==Other options==

Revision as of 01:42, 13 August 2018

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.
Some of the related mapping procedures are:

All mapping templates use similar parameters (see Examples):

  • 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 "&nbsp;XX&nbsp;YY&nbsp;")
  • label_size - percent from 0-200 (default: 95)
  • 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     - 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

Some common label background colors are: #CCCC55 for dim yellow,

  • #44EE44 for lime green, #BBBBBB for gray,
  • #44CCDD for light aqua, #DDDDDD for light gray (almost white),
  • PaleGreen for pale green, PaleTurquoise, DarkOrange, 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": DO&nbsp;NOT&nbsp;WRAP.

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.

See each specific mapping template for other parameters to pass.

Examples

You are Here is located in 100x100
You are Here
You are Here
Example on blank image
{{Location map | 100x100
| caption = Example on blank image
| width=250 
| label=You are Here
| label-size=90
| background = #DDDD44
| position=bottom 
| lat  = 55.00  
| long = 22.35  
| mark=Green_pog.svg 
| marksize=10 
| float=right 
}}
Dot is located in 100x100
Dot
Dot
Marker on star
{{Location map | 100x100
| AlternativeMap = Gold star on blue.gif
| caption = Marker on star
| width=110 
| label=Dot
| label-size=80
| background = #CCCCCC
| position=left 
| lat  = 81.00  
| long = 42.90  
| mark=Red_pog.svg 
| marksize=8 
| float=right 
}}

Other options

It is possible to place markers/labels outside a map, by specifying latitude or longitude coordinates beyond 0-100.0:

  • Over longitude=99.0 will push a label off-map to the right;
  • Under longitude= -2.0 will push a label off-map to the left;
  • 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).

See also