(Created page with "= Google Map extension for MediaWiki = [http://www.evanmiller.org/ Evan Miller] wrote a wonderful MediaWiki extension to support Google Maps. <center> <googlemap ve...")
 
m (Bugs)
Line 19: Line 19:
 
== Bugs ==
 
== Bugs ==
  
Oddly enough, it seems there's a bug in the distributed files. May be it only affects some implementations. If you see the map in the wiki article, but do see the map in the editor (when you click the icon), try to edit the file ''GoogleMaps.body.php'', and, according to [http://www.mediawiki.org/wiki/Extension_talk:Google_Maps#FIXED_in_the_latest_releases_9.2F29.2F09], change the line:
+
This extension doesn't work well with [http://www.mediawiki.org/wiki/Manual:$wgUseTidy HTML tidy], otherwise necessary for the display of important Wikipedia templates, such as [http://en.wikipedia.org/wiki/Template:Navbox 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 [http://www.mediawiki.org/wiki/Extension_talk:Google_Maps#FIXED_in_the_latest_releases_9.2F29.2F09], changing the line:
  
 
<pre>
 
<pre>

Revision as of 20:38, 2 February 2013

Google Map extension for MediaWiki

Evan Miller wrote a wonderful MediaWiki extension to support Google Maps.

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

You get this simply enough:

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

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