m (Bugs)
m
 
(One intermediate revision 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 ==

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