Template:Image Map/Doc

From Starfield Wiki
Jump to: navigation, search

Summary[edit]

This template is for creating maps with images, with superimposed labels for buildings or other locations. It is derived from Location map on wikipedia.

The labels are not actually created by this template,but rather by Image Mark. This template is necessary, however, to create a "fake" thumbnail image so that the label markup can be inserted inside the thumbnail's <div>...</div>.

One peculiarity of the interaction between Image Map and Image Mark is that any parameters that are shared by all of the templates must be set before calling Image Map, using Template:Image Map Setup. In particular, to change the size of the image, use the following syntax:

{{Image Map Setup|width=400}}{{Image Map...}}

Other settings that apply to all of the Image Mark calls can be set the same way, e.g., {{Image Map Setup|background=#CCCCCC|mark_size=44}}.

Parameters[edit]

Image Map
Parameter Scope Description
STANDARD PARAMETERS
1 or image optional Name of the image that should be displayed. Defaults to SF-map-{{PAGENAME}}.png.
label optional Text to be displayed under the image. Defaults to {{PAGENAME}} Map.
float optional Specifies the position of the image on the page. Valid values are left, right, center and none. The default is left.
alt optional Alt text for image. Defaults to label.
locations optional The locations to be superimposed on the image. Although technically optional, if locations isn't being set, you probably don't want to be using this template. Locations should be the output of one or more calls to Template:Image Mark; each call generates a separate location marker and label. There is no limit to the number of times Image Mark can be called.
DEPRECATED PARAMETERS
border optional Specifies the color of the 1px image border. The default is lightgrey. If set to none, no border will be generated. This parameter is seldom used.
caption optional Basically an obsolete parameter in this version of the template. In the original wikipedia template, leaving caption empty would create a non-thumbnail image.
width optional Determines the width of the map in pixels. The default is 240. Do not include px. This parameter should never be set in the Image Map call. Instead, it should be set by using a call such as {{Image Map Setup|width=400}} before the template (see comments in Summary).

Examples[edit]

{{Image Map Setup|width=400|background=#EE8866|mark_width=12|mark_color=White}}{{Image Map
|float=left
|locations=
{{Image Mark|x=565|y=865|label=Shield Wall|mark_alt=Shield Wall (5 ranks): 20 Block|position=bottom}}
{{Image Mark|x=175|y=670|label=Deflect Arrows|mark_alt=Deflect Arrows: 30 Block|position=bottom}}
{{Image Mark|x=265|y=340|label=Riposte|position=bottom}}
{{Image Mark|x=465|y=240|label=Elemental Protection|position=left}}
}}

{{FromUESP|Template:Perk Tree}}