Widget:Infobox map
From Guild Wars 2 Wiki
Jump to navigationJump to search
This widget uses Leaflet.js and the official map tiles API to display interactive maps on the wiki. This specific widget displays an NPC's location using coordinates from the NPC infobox.
This widget should only be used once per page.
Parameters
- coordinates
- The X and Y coordinates of the NPC according to your preferred GW2 GPS coordinate generator. The widget expects [x,y] coordinate pairs. If multiple coordinates are specified, separate each point's square brackets with commas, and enclose the entire chain in an additional set of square brackets, e.g. [[x1,y1],[x2,y2],[x3,y3]]. These will then be plotted as multiple markers
- Specified as a third value in the first array; the floor number. In Tyria, floors are usually -1, 0, 1 or 2, with exceptions for dungeons. Floors for the Mists maps vary wildly.
- Specified as a fourth value in the first array; the continent number. 1 for Tyria, 2 for the Mists.
- path
- Groups of X and Y coordinate pairs forming a path.
- bounds
- Groups of X and Y coordinate pairs forming a polygon.
- localtiles
- Optional. If set, will use wiki tiles instead of the API. Only useful if the tiles exist in Category:Map raster tiles.
- icon
- Optional. If set, must be the url for a 32px icon.
- waypoint_id
- Optional. If set, displays a waypoint with matching map id.
Example codes
Lion's Arch, Floor 1, Tyria {{infobox map | coordinates = [48868, 31184] }} Lion's Arch, Floor 2, Tyria {{infobox map | coordinates = [48868, 31184, 2] }} Revenge of the Capricorn, Floor 8, The Mists {{infobox map | coordinates = [8388, 6998, 8, 2] }}
Notes
- This widget should only be used via Template:Infobox map so that its usage can be tracked.
- Specifying a bad set of floors or continents will show black tiles - please don't submit edits with the wrong floor or continent.