Custom zxy map

From MediaWiki Widgets

Custom zxy map widget
Description:Create slippy Leaflet.js maps using any zxy tile source.
Code:Widget:Custom zxy map
Updated:August 26, 2017
If you use code on your wiki which is older than this date you may want to update since your widget may be insecure or broken.
Inv-Icon tools.svg.png

To copy this widget to your wiki, cut and paste the entire source of the Custom zxy map widget code page into a page called Widget:Custom zxy map on your wiki.

If you don't have the Widget extension set up on your wiki, go to its description page on and follow the installation instructions.

This widget creates a small Leaflet.js slippy map using a custom zxy source. By default, it uses the Wikimedia maps source.


{{#Widget:Custom zxy map
| tiles =
| lat = -10.1502
| long = 0
| zoom = 4
| attribution = <a href="">Wikimedia</a>
| width = 300px
| height = 300px
| mapid = uniqueMap


mapid (optional; default mapid)
A unique identifier for the map. Required if you use the widget more than once on a page.
width (optional; default 250px)
A CSS width for the map's container div.
height (optional; default 200px)
A CSS height for the map's container div.
The decimal latitude for the map's center, with positions north of the equator as negative values.
The decimal longitude for the map's center, with positions west of the meridian as negative values.
zoom (optional; default 6)
The map's starting zoom level, as an integer.
tiles (optional; default
The tile server's base URL, with no trailing slash.
HTML string to provide attribution for the map's sources.


blog comments powered by Disqus