Widget:Marker map

From Guild Wars 2 Wiki
Jump to: navigation, search

This widget uses Leaflet.js and the official map API to display interactive maps on the wiki. This specific widget displays custom markers on top of a given map.

This widget can only be used once per page.


Required An array of javascript object key-value pairs describing the markers. See the example code below.
Optional The ID of the map to display.
Initial zoom level for the map. Default is 4.
height / width 
Minimum height and width of the map pane, in pixels. Default for both is 800.
The type of clear applied around the map container. Choices of left, right or both. Defaults to both.
centerX / centerY 
Override default XY center coordinates upon page load.
Used to address mismatches in the API.
Used to address mismatches in the API.
Optional. If set, will use wiki tiles instead of the API. Only useful if the tiles exist in Category:Map raster tiles.

Example code

{{#Widget:Marker map | map = 1142 | zoom = 6 | centerX = 30198 | centerY = 14346 | markers = [
 { "name": "Marker One Name", "coord": [30187, 14087], "text": "This is a simple sentence describing the marker."  },
 { "name": "Marker Two Name", "coord": [30504, 14489], "text": "This is a sentence containing a working [[Main Page|wiki link]]." },
 { "name": "Marker Three Name", "coord": [29981, 14508], "text": "I ran out of example ideas, but remember to enclose sentences in doublequotes." },

Examples pages