Template:Advanced map

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to navigation Jump to search
Template documentation
This documentation is transcluded from Template:Advanced map/doc. [edit] [history] [purge]
Template:Advanced map invokes function main in Module:Advanced maps using Lua.

Template for creating advanced (dungeon type) maps. {{Advanced multimap}} can be used to combine several of these maps.

The main documentation on creating advanced maps and how to use this template can be found at Help:Editing/Advanced maps

Parameters

  • title - A title for the map (may be or contain a link)
  • name - The page name for the map, assuming it is in the map namespace (without the Map: prefix). Omit to suppress discussion/edit links
  • mapID - The id of the map to display
  • mapVersion - Force the map to use a certain map version (generally for historical or seasonal maps)
  • plane - The plane of the map
  • zoom - The zoom of the map, default=2
  • center - The center point of the map (coordinates): x,y eg 3000,4000
  • size - Size of the mapframe itself in px (the template will be longer and slightly wider than this): x,y eg 400,500
  • group - The group to add the map features too, must be a simple string of letters and numbers. Ensures the map only displays the specified features. See Help:Editing/Advanced maps § Transcluding maps for including the features on other maps.
  • shadows - Adds optional light or dark drop shadows to pins and images to make them more visible on the map. Allowed values are light and dark.
  • keycols - Make the key have a custom number of columns (default is 2), minimum width of columns is fixed at 175px. Can be any integer between 1 and 4.
  • compass - Adds a compass to the end of the key.
  • align - Alignment of the map (on pages not in Map namespace), default is center.


  • mapcats - A comma separated list of categories to add to the map itself.
  • pgcats - A comma separated list of categories to add to pages using the map.


  • nopreprocess - Any value causes the template to output the html element and json instead of rendering the map/link
  • maponly - Any value causes the template to output only the interactive map, without a title, border or key.
  • keyonly - Any value causes the template to output only the map key (with a title if provided).

Features

Features are any items you wish to add to the map, these can be: polygon, line, circle, icon, text, pin, icon, square or dot. dot is the default and results in a round dot. Both the dot and square types auto generate a unique color if none is specified using the |fill# = parameter. For additional parameters per feature type see below. The basic 2 parameters for each feature type are |coords# = and |type# =, where type is one of the before mentioned types.

Appearance Feature
dot
square
Text label
text
Pin green.svg
pin
World Gate map icon.png
icon
line, lines
polygon, complex-polygon
circle

Per feature parameters

For each feature the minimum required is the |coords# = parameter which lists the coordinates of the current feature (corners/ends for lines/polygons, individual locations for all other types). The coordinates should be given as a semicolon seperated list of coordinates: 4000,3200;3500,3000. For complex-polygon and lines groups of coordinates are separated by ;; (white-space, line-breaks etc are allowed between the 2 semicolons). In complex-polygons the first group is the outer bounds and additional groups are holes, while in lines each group represents a line. Generally in most cases |title# = should also be provided, which is the title listed in the key, and also in the popup when the item is clicked. A |description = can also be added, which is added to the popup. Both titles and description can be a link or contain links, for example to link to item, monster etc pages. Generally text features do not need either of these, and should avoid it so that if they are a link it can be clicked easily.

All available style arguments per RuneScape:Map/Style args can be used in the format: |style-argument# for example |fill-opacity3 = 0.5 to change the fill-opacity for the 3rd feature set.

icon

Icon is a special feature type that allows the use of a predefined on wiki image as a pin without worrying about the size and anchor locations. In general all icons used on the map or minimap in game, as well as teleport icons can be used in this way. The icons are defined at Module:Map/icons, and can be seen at Help:Editing/Interactive maps/icons.

Customising the key

Any feature that has a |coords# = and is not a text type will get an entry on the key (bellow the map). This entry can be suppressed by passing any value to the |nokey# = t. Additionally you can create entries that appear only on the key, by excluding the |coords# = param and adding a |key# = t param. The types here are the same as for map features and will appear the same in the key. Additionally the type key can be used to add an entry to the key without a corresponding symbol.

Quick copy

{{Advanced map
|title = 
|name = 
|mapcats = 
|size = 
|align = {{{align|center}}}
|mapID = 
|plane = 
|center = 
|group = 
}}