Mall:Overlay

Från Wikipedia
Hoppa till navigering Hoppa till sök

[visa] [redigera] [rensa sidcachen]

Test Template Info-Icon.svg Dokumentation


Namn[redigera wikitext]

Denne skabelon kaldes Overlay i Wikipedia. Den hedder Overlay legend i Commons.

I Wikipedia viderestilles Overlay legend og Legend overlay til Overlay.

Användning[redigera wikitext]

Image overlay[redigera wikitext]

Allows image numbered, textual number, or colour tag overlays to be positioned over an image to indicate particular features in the image.

Up to 30 overlays can be positioned over the image. Any overlay can be placed over the image up to 3 times, to indicate multiple locations of the same feature in the image.

The present set of available colours of overlays are as follows:

Color name Available images
red (default) 0 white, red rounded rectangle.svg39 white, red rounded rectangle.svg
blue 0 white, blue rounded rectangle.svg31 white, blue rounded rectangle.svg
green 0 white, green rounded rectangle.svg31 white, green rounded rectangle.svg
brown 10 white, brown rounded rectangle.svg35 white, brown rounded rectangle.svg
saddlebrown  10 white, saddlebrown rounded rectangle.svg19 white, saddlebrown rounded rectangle.svg, and 31 white, saddlebrown rounded rectangle.svg
yellow 10 white, yellow rounded rectangle.svg19 white, yellow rounded rectangle.svg

The colour of each overlay can be individually set. Each overlay inherits its colour from the previous overlay, so only the first of any colour grouped overlays needs to have its colour set.

Each overlay is configurably wikilinkable by the template.

The overlays can be turned off by setting overlay to 'no', which will result in the only the image and legend being displayed. This is particularly useful when the image itself already includes the overlays and-or colour tagging. See Spider's main organs below for example.

Overlay legend[redigera wikitext]

A legend of the text for each overlay is displayed by default, in 3 columns, under the image.

The legend can be turned off by setting the number of columns to '0'.

The legend can be grouped into groups of overlays, explicitly up to 6 groups. Each explicit legend grouping can optionally be given a title.

The number of overlay legend text items in each column is automatically balanced by the template across the columns within each legend grouping.

If the start overlay item for the first explicit grouping is after the first overlay item then the overlay text items from the first overlay up to but not including the first explicitly grouped overlay item are displayed as an untitled grouping before the first explicit group.

If an end overlay item is specified for any explicit grouping and there is no following explicit grouping, then the remainder of the overlay items are displayed as an untitled grouping after the last explicit group.

By setting the start of the first explicit grouping after the first overlay item and the end of the sixth explicit grouping before the last overlay item, effectively 8 groupings can be configured, the first and eighth being untitled.

Deficiences[redigera wikitext]

Automatic column balancing[redigera wikitext]

While the template will handle missing set overlay values at the start, that is the first overlay item does not have to be overlay1, the template treats intermediate missing overlays as though they exist for column balancing, and it does not allow for any text wrapped new lines within an overlay item's text.

Undeterminable legend start and ends[redigera wikitext]

If legend titles are provided without a corresponding start or end and the template cannot explicitly determine one from an adjacent legend then it will "guess" and unexpected results might be produced, which might not be stable with any template updates.

Legend start and end ranges can be overlapped. This is either a deficiency or a feature depending on how you look at it. However, overlapping ranges might result in unexpected behaviour, which might not be stable with any template updates.

Double quotes in pop up tips for overlays[redigera wikitext]

Double quotes, ", cannot be placed in overlay tips when form = text or when form = colour are used. To include a double quote use its HTML coding, ".

Double quotes are always allowed in the overlay, but if the overlay tip for that overlay is not set separately, the tip, which defaults to the same text as the overlay, will probably not display correctly. The overlay tip for an overlay with double quotes in it should always be set explicitly when form = text or when form = colour are used.

Usage[redigera wikitext]

This is a colour/color friendly template. Either spelling can be used for any parameter value or any parameter name.

Skeleton[redigera wikitext]

{{overlay
| image        = 
| width        = 
| height       = 
| columns      = 
| grid         = 
| link         = 
| legendbox    = 
| float        = 
| overlay      = 
| border       = 
| legend1title = 
| legend1start = 
| legend1end   = 
<!-- ...up to 6... -->
| overlay1form = 
| overlay1     = 
| overlay1colour = 
| overlay1tip  = 
| overlay1left = 
| overlay1top  = 
| overlay1link = 
<!-- ...up to 30... -->
}}

Editing grid and coordinates[redigera wikitext]

To assist in determining the position of each overlay a coordinate grid showing from the left ordinates and from the top ordinates can be displayed by setting the grid parameter to yes:

| grid         = yes

The coordinate grid is 900 x 900, so if the image is set to be smaller than this, the page content may be off scrolled, etc. The presentation will return to normal when the grid parameter is removed or set to a value other than yes.

Note that the top ordinate is the position of the top of the overlay from the top of the image and the left ordinate is the left of the overlay from the left of the image.

Form = colour[redigera wikitext]

When setting

| overlayNform = colour

then the overlays still use up numbered positions within the list of overlays. Accordingly, if using a mixture of image and-or text forms with colour forms, then gaps will appear in the number sequence where a colour form overlay is specified.

It might be generally best if colour form overlays are always set as the last overlays. See Spider's main organs below for example.

Full minimal skeleton[redigera wikitext]

To assist editors, a full 30 overlays but minimal skeleton is provided below:

Examples[redigera wikitext]

Note: The data in these examples is not necessarily correct.

Brisbane (with grid turned on)[redigera wikitext]

Grid 99, 100 int red 50 int yellow (940).svg
BrisbaneRiver02 gobeirne-edit1.jpg
Jack Pesch, Walter Taylor, Albert, unnamed bridges
2 white, red rounded rectangle.svg
3 white, red rounded rectangle.svg
4 white, red rounded rectangle.svg
5 white, red rounded rectangle.svg
6 white, red rounded rectangle.svg
7 white, red rounded rectangle.svg
8 white, red rounded rectangle.svg
9 white, red rounded rectangle.svg
10 white, blue rounded rectangle.svg
11 white, blue rounded rectangle.svg
12 white, blue rounded rectangle.svg
12 white, blue rounded rectangle.svg
13 white, red rounded rectangle.svg
14 white, red rounded rectangle.svg
15 white, green rounded rectangle.svg
16 white, red rounded rectangle.svg
University of Queensland (UoQ) St Lucia Campus
18 white, green rounded rectangle.svg
Queensland University of Technology
20 white, red rounded rectangle.svg
Hospital
22 white, red rounded rectangle.svg
23 white, red rounded rectangle.svg
24 white, green rounded rectangle.svg
25 white, green rounded rectangle.svg
Victoria Park Golf Course
27 white, red rounded rectangle.svg
Floating pedestrian concourse
29 white, red rounded rectangle.svg
Long Pocket Golf Course
1 white, red rounded rectangle.svg Jack Pesch Bridge, Walter Taylor Bridge (road) (left), Albert Bridge (rail) (center), unnamed bridge (rail) (right)
2 white, red rounded rectangle.svg Eleanor Schonell Bridge (Green Bridge) (pedestrians, pedal cycles, buses)
3 white, red rounded rectangle.svg Merivale Bridge (rail)
4 white, red rounded rectangle.svg William Jolly Bridge (road)
5 white, red rounded rectangle.svg Victoria Bridge
6 white, red rounded rectangle.svg Captain Cook Bridge
7 white, red rounded rectangle.svg Story Bridge
8 white, red rounded rectangle.svg Pacific Motorway
9 white, red rounded rectangle.svg Suncorp Stadium (Lang Park) (Rugby league/Rugby Union/Soccer ground)
10 white, blue rounded rectangle.svg Norman Creek
11 white, blue rounded rectangle.svg Oxley Creek
12 white, blue rounded rectangle.svg Brisbane River
13 white, red rounded rectangle.svg Indooroopilly Shoppingtown
14 white, red rounded rectangle.svg "The Gabba" (Woolloongabba cricket ground)
15 white, green rounded rectangle.svg South Bank arts and recreation precinct
16 white, red rounded rectangle.svg Central business district
17 white, red rounded rectangle.svg University of Queensland (UoQ) St Lucia Campus
18 white, green rounded rectangle.svg City Botanic Gardens
19 white, red rounded rectangle.svg Queensland University of Technology (QUT) Gardens Point Campus
20 white, red rounded rectangle.svg Goodwill Bridge (pedestrians and pedal cycles)
21 white, red rounded rectangle.svg Hospital
22 white, red rounded rectangle.svg Mater Private Hospital
23 white, red rounded rectangle.svg Roma Street Rail Station
24 white, green rounded rectangle.svg Roma Street Parkland
25 white, green rounded rectangle.svg New Farm Park
26 white, green rounded rectangle.svg Victoria Park Golf Course
27 white, red rounded rectangle.svg Royal National Association Exhibition Grounds
28 white, red rounded rectangle.svg Floating pedestrian concourse
29 white, red rounded rectangle.svg Inner City Bypass (rail) (left) (road) (right)
30 white, green rounded rectangle.svg Long Pocket Golf Course

Charlotte Pass Village[redigera wikitext]

Charlotte Pass Village in August.jpg
Kosciuszko Chalet Hotel
Charlotte Pass Ski Centre
Bella Vista Staff Lodge (Cell Block, Cellavista)
4 white, red rounded rectangle.svg
Knockshannoch Lodge
Jerrabomberra Lodge
Spencer's Creek Lodge
Stillwell Lodge
Southern Alps Ski Lodge
Pygmy Possum Lodge
Snowbird Lodge
Arlberg Lodge
Burrawong Lodge
Alitji Lodge
Tar Gan Gil Lodge
Sewage plant (Shakespear's Lodge)
Basin Poma
Kosi Carpet (Magic Carpet (Moving carpet))
Kangaroo Ridge Triple Chairlift
"Fox hole" at the eastern end of Stillwell Ridge
Workshop
Accommodation and service buildings in Charlotte Pass Village
1 white, red rounded rectangle.svg Kosciuszko Chalet Hotel
2 white, red rounded rectangle.svg Charlotte Pass Ski Centre
3 white, red rounded rectangle.svg Bella Vista Staff Lodge (Cell Block, Cellavista)
4 white, red rounded rectangle.svg Kosciuszko Alpine Club
5 white, red rounded rectangle.svg Knockshannoch Lodge
6 white, red rounded rectangle.svg Jerrabomberra Lodge
7 white, red rounded rectangle.svg Spencer's Creek Lodge
8 white, red rounded rectangle.svg Stillwell Lodge
9 white, red rounded rectangle.svg Southern Alps Ski Lodge
10 white, red rounded rectangle.svg Pygmy Possum Lodge
11 white, red rounded rectangle.svg Snowbird Lodge
12 white, red rounded rectangle.svg Arlberg Lodge
13 white, red rounded rectangle.svg Burrawong Lodge
14 white, red rounded rectangle.svg Alitji Lodge
15 white, red rounded rectangle.svg Tar Gan Gil Lodge
Other facilities and features (Guthries Poma (Platter lift) and Pulpit T-Bar not shown)
16 white, red rounded rectangle.svg Sewage plant (Shakespear's Lodge)
17 white, red rounded rectangle.svg Basin Poma
18 white, red rounded rectangle.svg Kosi Carpet (Magic Carpet (Moving carpet))
19 white, red rounded rectangle.svg Kangaroo Ridge Triple Chairlift
20 white, red rounded rectangle.svg "Fox hole" at the eastern end of Stillwell Ridge
21 white, red rounded rectangle.svg Workshop

Spider's main organs (pre labelled image)[redigera wikitext]

Spider main organs labelled.png
Spider's main organs[1]
1
Fang (chelicera)
2
Venom gland
3
Brain
4
Pumping stomach
5
Forward aorta branch
6
Digestive cecum
7
Heart
8
Midgut
9
Malphigian tubules
10
Cloacal chamber
11
Rear aorta
12
Spinneret
13
Silk gland
14
Trachea
15
Ovary (female)
16
Book lung
17
Nerve cord
18
Legs
19
Pedipalp
Physiological systems[1]
  
Nervous system
  
Digestive & excretory system
  
Circulatory system
  
Respiratory system
  
Reproductive system

Template parameters[redigera wikitext]

Parameter Name Required Description Values
image no The image. If not set then only the legend is presented. Image file name.
width no Width of the image in pixels. Defaults to 500. Number.
height no Height of the image in pixels. Defaults to 500. Number.
columns no The number of columns to display the legend in. Defaults to 3. Set to 0 to not display any legend. Number == 0, 1, 2, 3, . . .
grid no Set to 'yes' to turn on the coordinate grid to allow easier determination of overlay coorindates while editing. Defaults to 'no'. All values other than 'yes' are equivalent to 'no'. Text == yes.
link no Set to 'yes' to turn on default linking of overlay and legend entry. Defaults to 'no'. All values other than 'yes' are equivalent to 'no'. Text == yes.
legendbox no Set to 'no' to turn off a box / border around each legend group set of overlays. Defaults to 'yes'. All other values other than 'no' are equivalent to 'yes'. Text == no.
float no Floats the image and legend. Defaults to centering the image and legend on the page. Text == right, left.
overlay no Determines whether or not the overlays are presented when an image is available. Defaults to 'yes'. All values other than 'no' are equivalent to 'yes'. Text == no.
border no Determines whether or not a border is placed around the whole presentation. Defaults to 'yes'. All values other than 'no' are equivalent to 'yes'. Text == no.
legend1title no Text for legend1 title. Optionally linked text.
legend1start no The number of the first overlay to appear in legend1. Defaults to the first overlay set, otherwise to the previous legend end plus 1 if there is a previous legend. Number == 1, . ., 30.
legend1end no The number of the last overlay to appear in legend1. Defaults to the next legend start less 1 if there is a next legend, otherwise to the last set overlay. Number == 1, . ., 30.
Both legend starts and legend ends do not need to be provided. Legend starts only, or, legend ends only, for each legend may be provided.
overlay1form no The form of the overlays. The default form is an image number, for example, 1 white, red rounded rectangle.svg. Other settings allow textual numbers, for example, 1, or coloured tags, for example,   . Defaults to the previous overlay form, or to 'image' if no previous overlay form. Text == image, text, colour/color.
overlay1 no Text for overlay1 for the legend. Defaults to overlay1tip if any. Text. Do not link. The template will link.
overlay1colour no Colour of overlay1. Defaults to the previous overlay colour, or to 'red' if no previous overlay colour. Text == red, green, blue.
overlay1tip no Pop up tool tip text to appear when the screen pointer is over overlay1. Defaults to overlay1. Text.
overlay1left no Distance in pixels of the left edge of overlay1 from the left side of the image. Number.
overlay1top no Distance in pixels of the top edge of overlay1 from the top side of the image. Number.
overlay1link no Text to be used as a link for the overlay legend text. Defaults to overlay1 if link is not set to no. Text. Do not link.
overlay1left1 no The same as overlay1left. As per overlay1left.
overlay1top1 no The same as overlay1top. As per overlay1top.
overlay1left2 no The left ordinate for a second position of overlay1. As per overlay1left.
overlay1top2 no The top ordinate for a second position of overlay1. As per overlay1top.
overlay1left3 no The left ordinate for a third position of overlay1. As per overlay1left.
overlay1top3 no The top ordinate for a third position of overlay1. As per overlay1top.

Se även[redigera wikitext]

  • {{Annotated image}}, allows text notes to overlap image, allows cropping
  • {{Site plan}}, to relatively position a marker image over a map image with selectable map, markers, and size
  • {{Superimpose}}, absolutely position one image over another
  • {{Superimpose2}}, to place up to 50 image layers over one another
  • {{Location map}}, places a single image over another at a map coordinate location

References and notes[redigera wikitext]

  1. ^ [a b] Ruppert, E.E., Fox, R.S., and Barnes, R.D. (2004). Invertebrate Zoology (7). Brooks / Cole. Sid. 571–584. ISBN 0030259827.