Template: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:Map/doc. [edit] [history] [purge]
Template:Map invokes function maptemp in Module:Map/templates using Lua.

Used to generate regular, square or pin maps or links. Default is a regular mapframe. 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
{{Map|2613,3294|caption=Map Caption}} {{Map|x=2613|y=3294|mtype=pin|group=pinex}}
Map Caption

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 {{Map|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 {{Map|2900,3000|x:2930,y:3020|3000,3020|mtype=line}}
Polygon {{Map|2500,3100|2500,3130|2520,3140|2540,3115|2520,3090|mtype=polygon}}
Polygon and pins {{Map|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 28 (surface)
  • plane - The map plane (0 is surface)
  • mtype - Type of map, one of: pin, square, polygon, line, pin-polygon, pin-line
  • caption - A caption for the map
  • align - The alignment, defaults to center
  • width - Width of the map (in px)
  • height - height of the map (in px)
  • 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)
  • show - Allows showing groups in addition to the group set above, or if no group is set, show only the groups listed. A single group, or comma separated list of group names
  • type - Render as link to map, instead of map: |type=maplink
    • text - The text to show as a link instead of Maplink (used with type=maplink)
  • 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 map/link

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: greyPin, redPin, greenPin, bluePin, cyanPin, magentaPin, yellowPin
  • 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


Converting coordinates from in-game

Co-ordinates can be found by using the getcamerapos command in the developer console. This gives the position of the camera (pos) and the position of the player (look). Look is what you want to use, which is in the form of a 5-value tuple of z,x1,y1,x2,y2.

The co-ordinates used by the map template are found by calculating 64 * x1 + x2 and 64 * y1 + y2. You can use the following calculator to automatically calculate it.

Calculator
The calculator form will appear here soon. You will need JavaScript enabled.
Result
The result will appear here when you submit the form.

See also