Contents

Google Map extension for MediaWiki

Evan Miller wrote a wonderful MediaWiki extension to support Google Maps. It got archived and from 1 February (2014) onward, we are using the MultiMaps extension instead.

Syntax

The syntax is pleasant:

<googlemap version="0.9" lat="35.983007" lon="-104.897804" zoom="12">
36.02439, -104.966125, Wish I was there...
</googlemap>

Useful options:

controls="small" type="terrain" scrollwheel="zoom"

Bugs

This extension doesn't work well with HTML tidy, otherwise necessary for the display of important Wikipedia templates, such as navbox.

Another recurring bug allows the map in the editor (when you click the icon) but not in the main article, where it is the most wanted. This can be fixed by patching the file GoogleMaps.body.php, and, according to [1], changing the line:

      function render16 ( $pContent, $pArgv, &$pParser ) {

to

      function render16 ( $pContent, $pArgv, $pParser ) {

It might still cause problems behind the scene but at least the end user gets to see the map.

Links