Template documentation
This documentation is transcluded from Template:MapLink/Sandbox/doc. [edit] [history] [purge]
Template:MapLink/Sandbox invokes function maptemp in Module:Sandbox/User:Jakesterwars/Map using Lua.

Used to generate regular, square or pin maplinks. For a list of available parameters see below.

Usage

Single

The caption is optional, for all other available parameters see below.

Simple Map Pin Map
{{MapLink|2613,3294|text=Map link text}} {{MapLink|x=2613|y=3294|mtype=pin|group=pinex}}
Map link text

Multiple

Multiple points can be combined on one map, or used to create lines and shapes. Individual points can have their own specific parameters, for all available parameters see below. Points should be represented as unnamed arguments in the format |x,y| or |param:value,param2:value...|.

Pins {{MapLink|2900,3000|x:2930,y:3020,desc:This is a description,title:Pin title|x:2870,y:3080,iconWikiLink:You_are_here.png,title:Image|mtype=pin|icon=redPin}}
Line {{MapLink|2900,3000|x:2930,y:3020|3000,3020|mtype=line}} Map with a line
Polygon {{MapLink|2500,3100|2500,3130|2520,3140|2540,3115|2520,3090|mtype=polygon}}
Polygon and pins {{MapLink|2500,3100|x:2500,y:3130,desc:This is a description,title:Pin title|2520,3140|2540,3115|2520,3090|mtype=pin-polygon|icon=greenPin|group=example}}

Parameters

If pin type map is chosen and only x/y parameters are given ({{Map|x=2520|y=3140|mtype=pin}}) these x/y are also used as the pin location.

Template

  • mapID - Map id (see RuneScape:Map/mapIDs for a list) defaults to 0 (surface)
  • plane - The map plane (0 is surface)
  • mtype - Type of map, one of: pin, square, polygon, line, pin-polygon, pin-line
  • text - The text to show as a link instead of MapLink (used with type=maplink)
  • zoom - override default zoom
  • x - X-coordinate for the center of the map
  • y - Y-coordinate for the center of the map
  • group - Group (all pins, shapes etc in the same group, on the same page, will appear on each others maps)
  • If mtype is square, polygon or combos:
    • title - Title of the polygon (displays in popup on click)
    • description - Description of the polygon (displays in popup on click)
  • nopreprocess - Any value causes the template to output the html element and json instead of rendering the maplink

Per Point

Will override the template params

  • plane - The map plane (0 is surface)
  • desc - Pin description (is appended to templates desc)
  • icon - The type of icon (pin) to display. Default is a green pin, possible values are: greenPin, redPin, greyPin
  • iconWikiLink - Use an image on the wiki as a pin. Spaces should be replaced with _
For the following params if the param name is used, 1 number is expected and used for x and y, to specify individually use paramNameX and paramNameY eg ...,iconSizeX:20,...
  • iconSize - Size of the image used as a pin (resizes image)
  • iconAnchor - Location of the map point relative to the image, default is top left (top left of image is specified point on map), positive numbers run down and to the right
  • popupAnchor - Location of the popup relative to the image, default is iconAnchor (top left unless specified), [0,0] is the iconAnchor, positive numbers run down and to the right