Template:Map
Template documentation follows |
---|
Note: the template above may sometimes be partially or fully invisible. |
Visit Template:Map/doc to edit this documentation. (How does this work?) |
Template:Map allows you to display maps of SoG areas and tag certain locations for display.
It is similar in idea to Template:Overlay Simple, but doesn't implement grids or a scroll bar; instead, the image (and the indicators) can be moved around if the map is really large.
The template makes a call to Module:Map, which implements the HTML and CSS. There's also some JavaScript code in Mediawiki:Common.js that implements the map dragging.
The parameters imageWidth and imageHeight must be specified, and they must correspond to the map's width and height for reliable displaying.
Parameters
Parameter | Description | Values (Lua) |
---|---|---|
groups | Number of groups to use in the legend.
The template will try to spread out the legend entries across the number of groups specified. |
|
anchor | An anchor for linking to this element.
If specified, a with an id #anchor will be generated. |
|
imageWidth
imageHeight |
Specifies the image's width and height.
This value is used for positioning the indicators, and is also important for proper display. The template cannot deduce these parameters on its own (for the time being). |
|
imageScale | Scaling value to be used for the image.
imageWidth and imageHeight are multiplied by this value internally. You should use this for resizing, instead of specifying new widths and heights manually. |
|
image | The image to be used as a map. |
|
containerWidth
containerHeight |
Specifies the max width (in %) and max height (in px) of the template container.
If you want to limit the max size of the container, you can lower these values. |
|
legend | Text to display as title for the legend table |
|
posN
posNx posNy posNlink |
Specifies the properties of an indicator, where N is the indicator's index (ranging from 1 to 32).
If an element has posNx = 25 and posNy = 50, it will be displayed at the image's equator, at 1/4th of the image's width from the left edge. |
|
Usage Example
{{Map |imageScale = 0.6 |imageWidth = 2060 |imageHeight = 800 |containerHeight = 600 |image = PMUpper_0.890b.png |legend = Locations (Upper Pillar Mountains) |pos1 = Startington |pos1x = 20 |pos1y = 4 |pos1link = Startington#Map |pos2 = Middle Pillar Mountains |pos2link = |pos2x = 84 |pos2y = 97 |pos3 = Teleport Plate |pos3link = Teleport Plates |pos3x = 25.3 |pos3y = 13 |pos4 = Mumrik |pos4x = 71.5 |pos4y = 32.7 |pos4link = Mumrik }}
Locations (Upper Pillar Mountains) | ||
1. Startington | 2. Middle Pillar Mountains | 3. Teleport Plate |
4. Mumrik |