Extension:IncludeBikemap

What can this extension do?
The IncludeBikemap extension is a simple tag extension to embed a bicycle tour map from bikemap.net in a mediawiki page. Bikemap.net offers to embed maps in an iframe in personal homepages (note: this extension is not offered by bikemap.net but written by a user).

German-speaking documentation/deutschssprachige Dokumentation:

Es ist eine deutschsprachige Dokumentationsseite im Fahrrad- [ Projekt -Wiki] verfügbar.

Usage
ID

ID is the number of the bike route in the url. For example ID for www.bikemap.net/route/817755 is 817755.


 * Optionally


 * Change the size of the embeded map (default: medium):

ID

size can be "small", "medium" or "big".


 * Change the type of the embeded map (default: openstreetmap (osm)):

ID

maptype can be "card" (googlemaps), "hybrid" (googlemaps), "terrain" (googlemaps), "osm" (openstreetmap), "ocm" (opencyclemap) or "sat" (googlemaps).


 * Change if the altitude diagram shall be shown (default: true):

ID

ev can be "true" (default) or "false".

ToDo
Not yet performed:


 * change heigth and width manually as needed (currently only three fixed sizes are supported)

Code:


 * cleaner code design
 * better code commenting

Future:


 * Extension shall perform also gpsies and the other Toursprung maps (similar to bikemap.net) like ITrackViewer plugin for dokuwiki (maybe the extension name should then changed)

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

Changelog
0.1.3: (2011-03-05) This version fixes the problems with the map size from former versions and now we are able to change between an extended view version which shows an altitude diagram or simply switch it of; fix not showing route id in footer

0.1.2: (2011-03-05) Now it is possible to change the maptypes (default openstreetmap); fix iframe source; fix header documentation

0.1.1: (2011-03-05) Fixed some bad code issues (see Extension talk:IncludeBikemap): changed fundamental variables design, unneccessary escaping, bad wfMsgForContent use

0.1: (2011-03-05) Introduce the extension on mediawiki.org

Sites that use IncludeBikemap

 * Fahrrad-Projekt-Wiki