Template:Map/doc
Used to generate regular, square, or pin maps or links. Default is a regular mapframe. For a list of available parameters see below.
To find coordinates of a specific map square, tools such as https://mejrs.github.io/osrs can be used.
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}}
|
Shapes
Squares and rectangles can be drawn using the mtype
parameter. Note that the point provided defines the centre of the shape. For squares, r
defines half of the length of the square's edges, i.e. the shortest distance from its centre to one of its edges.
Square | Rectangle |
---|---|
{{Map|3028,3306|r=3|mtype=square}}
|
{{Map|3028,3306|squareX=3|squareY=8|mtype=rectangle}}
|
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...|
.
Maplinks
Any map can be rendered as a maplink instead of a mapframe by using |type=maplink
. The |text=
parameter can be used to change the text of the link.
Examples
{{Map|2613,3294|type=maplink}}
{{Map|2613,3294|type=maplink|text=Maplink Text}}
{{Map|2613,3294|type=maplink|text=}}
{{Map|x=2613|y=3294|type=maplink|mtype=pin|group=pinex}}
{{Map|2500,3100|x:2500,y:3130,desc:This is a description,title:Pin title|2520,3140|2540,3115|2520,3090|type=maplink|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
type
- Render as link to map, instead of map:|type=maplink
mapID
- Map id (see Near-Reality:Map/mapIDs for a list) defaults to 0 (surface)plane
- The map plane (0 is surface)mtype
- Type of map, one of:pin, square, rectangle, polygon, line, pin-polygon, pin-line, circle
r
- Radius of the marked area (in tiles) with|mtype=square
or|mtype=circle
squareX
- Width of the marked area with (in tiles) with|mtype=rectangle
squareY
- Height of the marked area with (in tiles) with|mtype=rectangle
ptype
- Type of pin description format, one of:item, object, npc, monster
(defaults to XY coordinate description if no desc is provided)caption
- A caption for the map (has no effect with|type=maplink
)text
- The text to show as a link instead of Maplink (used with|type=maplink
)align
- The alignment, defaults to centerwidth
- Width of the map (in px)height
- height of the map (in px)zoom
- override default zoomx
- X-coordinate for the center of the mapy
- Y-coordinate for the center of the mapgroup
- Group (all pins, shapes etc in the same group, on the same page, will appear on each others maps)showPins
- Displays a link to a new map of pinned objects below a mapframe. Only use with Infobox Map param! This sets mtype to square by default. (Pass in a desc param to make the pins have adequate descriptions)- 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/linksmw
- Set toyes
to set the Location JSON property. Set tohist
to set the Historic Location JSON property. When not defined, no SMW properties are set.
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:redPin, greenPin, bluePin, cyanPin, magentaPin, yellowPin, 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
andparamNameY
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 rightpopupAnchor
- 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
- For the following params if the param name is used, 1 number is expected and used for x and y, to specify individually use