Extension:SlippyMap

The SlippyMap extension allows embedding of slippy maps by bringing in the OpenLayers JavaScript library. It's pluggable so that (with the right configuration) multiple free map sources can be included, but it's being aimed especially at embedding OpenStreetMap maps.

It's a fork of the Slippy Map MediaWiki Extension hosted in OpenStreetMap SVN and is being hacked to allow it to be deployed on Wikimedia projects, but currently a lot of bugs are standing between it and that objective.

Who's using it?
Please add your wiki here! Add it to the top, and feel free to add a link to your favourite article or two.
 * Wiki-Brest
 * We are beginnig to use this extension, waiting for improvements, and involved in OpenStreetMap community around Pays de Brest (exemple Quartiers de Brest)
 * openstreetmap.org
 * This is where this extension originated see 'Slippy Map MediaWiki Extension' page. Currently forked a version of the code in the OSM repo, but trying to re-sync (and swap to using the new syntax)
 * 
 * Just to let others know where you live, or feed them misinformation... e.g.: Translatewiki:User:Raymond/Kölner Dom. Newish version (latest syntax)
 * Fürthwiki
 * We use OSM & SlippyMap whenever we describe streets, important buildings or sights: (old version old syntax)
 * e4pedia
 * We use it for locating our bases and events (example)
 * Wikivoyage
 * We use the maps in the articles of the locations like Innsbruck and at the MapSources special page like this for Innsbruck. The authors can use the OpenStreetMap template to put it to the articles in an easy manner.

Syntax
The extension allows users to embed a slippy map using the following syntax in their wiki code:



Older version (running on the above sites) took a syntax like this:

lat=51.485|lon=-0.15|z=11|w=300|h=200|format=jpeg

Users can discover suitable latitude logitude and zoom values by doing the following:
 * Edit the page
 * Use the slippymap syntax with any old values e.g. paste in the above example
 * Doing a preview
 * zoom/pan the right position,
 * Use the 'Get wikicode' button
 * Copy and paste the resulting wiki code into the editing box
 * Save the page

Installation
1) Checkout a copy of the SlippyMap extension code to:



2) Add to the LocalSettings.php file:



Note: this extension is under active development, so is not stable.

TODO

 * support multiple maps on one wiki page
 * fix js embedding include method
 * internal marker image
 * config option to enable/disable
 * MapOfService
 * a layer
 * make get "Get wikicode" button marker aware
 * Change syntax to be in line with Extension:Google Maps
 * Support multiple markers (specified in the content area) Deprecate marker= attribute
 * Support for markers with content text
 * Allow content text with wikilinks and images
 * Support for polylines
 * Edit page toolbar button for adding a map.
 * Interface for choosing the location of the map to add.
 * display:none for the buttons' panel in the case of printing