Template:Map locations

From comp.tf
Revision as of 13:55, 31 July 2013 by Atlas (talk | contribs) (Migrating from User:Atlas/Template:Map locations, adding documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

This template allows you to add markers to an image. When hovering over the marker, the name of the area will appear.

This template's parameters are:

  • templatename - Name of the template, without the Template: prefix. Enables the shorthand view/discussion/edit menu.
  • collapse - Collapses the box on load. Off by default. Use collapse = true to collapse the box.
  • title - Title of the box.
  • image - Filename of the image to be used as the base for the map location template. The image will be automatically resized to be 800 pixels wide.
  • You can add up to 15 locations on the map. Every location is controlled by three attributes.
    • arean - Name of a given area/location.
    • xn and yn - X and Y coordinates of the map marker. The best way to get those coordinates is to copy an 800px wide version of the image you will be using, then copying the map marker file, adjusting them in the appropiate places, then getting the coordinates of the upper right corner of the marker.
  • The n in the above fields' names is to be replaced with a number from the range (1-15).

Example

{{Map locations
 | title = Badlands - Middle point
 | image = cp_badlands.png
 | area1 = Train
 | x1 = 325px
 | y1 = 173px
 | area2 = Balcony
 | x2 = 204px
 | y2 = 294px
 | area3 = Shithouse
 | x3 = 680px
 | y3 = 286px
 | area4 = Valley
 | x4 = 416px
 | y4 = 277px
 | area5 = Hoodoo
 | x5 = 295px
 | y5 = 213px
}}

will yield