Extension:IncludeBikemap

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).

For a German-speaking documentation see on / Für eine deutschssprachige Dokumentation siehe im Fahrrad- [ Projekt -Wiki].

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. The folder IncludeBikemap must be created first.

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

Changelog
0.1.4.1: (2011-03-07) Test that $input has only numbers

0.1.4: (2001-03-06) Bug fix: $wgExtensionCredits; bug fix: default iframe size bad if $ev is set to false; fix code layout; added comments

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