(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
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
= Google Map extension for [[MediaWiki]] =
 
= Google Map extension for [[MediaWiki]] =
  
[http://www.evanmiller.org/ Evan Miller] wrote a wonderful [[MediaWiki]] extension to support [[Google Maps]].
+
[http://www.evanmiller.org/ Evan Miller] wrote a wonderful [[MediaWiki]] extension to support [[Google Maps]]. It got archived and from {{thisday|1|February|2014}} onward, we are using the MultiMaps extension instead.
  
<center>
+
== Syntax ==
<googlemap version="0.9" lat="35.983007" lon="-104.897804" zoom="12">
+
36.02439, -104.966125, Wish I was there...
+
</googlemap>
+
</center>
+
  
You get this simply enough:
+
The syntax is pleasant:
  
 
<pre>
 
<pre>
Line 16: Line 12:
 
</googlemap>
 
</googlemap>
 
</pre>
 
</pre>
 +
 +
Useful options:
 +
 +
<pre>controls="small" type="terrain" scrollwheel="zoom"</pre>
  
 
== 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>

Latest revision as of 19:54, 2 February 2014

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