This page describes a Slippy Map MediaWiki extension. See MediaWiki extension for details of other ideas / enhancements we could develop. This extension embeds an OpenLayers slippy map into the contents of the wiki page, for example:

Wiki users can add a 'slippymap' tag into the page wiki-text. In this they can specify parameters 'lat', 'lon', 'z' (zoom level), 'w' (width in pixels), 'h' (height in pixels), and 'layer' (mapnik, transport, or cycle)

The extension spits out the javascript which launches OpenLayers within a sized DIV

Syntax

To find the suitable lat/lon values, open a new browser window, look at the front page map and use the 'permalink' feature in the bottom right.

Note that the extension installed here also supports an old format: <slippymap>lat=51.485|lon=-0.15|z=11|w=450|h=330|layer=osmarender</slippymap>, but we should edit all the wiki pages to switch over to the new format.

Download & Installation

If you're running your own mediawiki, you can set it up to support <slippymap> tags by installing the extension as follows:

MediaWiki Versions

Harry Wood originally created this to run on a really old v1.4 MediaWiki installation. The newer version probably isn't so backward compatible though.

Dependency note

This introduces a dependency between your wiki and the various openstreetmap tile servers. If openstreetmap ceases to provide images under these URLs, for whatever reason, then your wiki will still function, but it will show image errors.

We are offering no guarantees about the long-term continuation of this (or indeed any) openstreetmap service. Equally the extension code may be re-written, and you should aim to use the latest code available here. e.g. for security fixes.

There are a number of limitations and things which could be enhanced. The MediaWiki extension page has lots of ideas for this.

Known issues / ideas

Can't embed two different slippy maps on the same wiki page. This is because all the javascript variable names and the 'id=map' document object cease to be unique. Fixable with a bit of hacking.

Who's working on it

The extension code

The code has been re-homed in several confusing ways over the years. On this wiki page -> OSM's svn -> Mediawiki's SVN -> wikimedia gerrit. These days this wiki is pulling from: https://github.com/Firefishy/SlippyMap