Extension talk:Google Maps

''This is a discussion page for Google Maps Extension; if you're having trouble installing or have a feature suggestion, this is the place. Please sign your comments by typing --~ at the end of your contribution, and be careful not to delete what other people have said. See also the archive for older/fixed issues.''

How to ad Adsense to Extension
Any idea on how to add GAdsManager syntax in the extension?

Broken link to .kml file appears as &#38;lt;googlemapskml&#38;gt;
I use GoogleMaps-0.9.3 in combination with mediawiki-1.12.0 and PHP 5 and all works fine except for the .kml file export link in the "Special pages" section of the wiki, which appears including the "&#38;lt;" and "&#38;gt;" character entities, as follows:

&#38;lt;googlemapskml&#38;gt;

I've seen the same appear on some other wiki's with GoogleMaps. Clicking the link will prompt the browser to download a plain text file named "kml" or ".kml", which contains the following line of text only:

No article found by the name of

What is the purpose of the link and file and how can GoogleMaps be reconfigured to exclude it from the "Special pages" section? I'm not yet familiar with .kml files and their functionality, but I suspect they will not have a great deal of use on my particular wiki set up, and so it would be good to know how to remove the feature.

Thanks for any tips. ~ CampMaster, Sat Jun 21 13:53:06 CEST 2008

I'm encountering exactly the same phenomenon using exactly the same setup (GoogleMaps 0.9.3, MediaWiki 1.12, PHP 5). Any solution available yet?

Many thanks,

Hikey 10:39, 27 August 2008 (UTC)

Tabbed info balloons
This extension has just been installed at the Great Lakes Wiki ... I have been hacking around trying to understand the features. It's TRES nifty. I think maybe I'm doing something wrong with tabbed info balloons, can someone point me to a wiki/page/map that uses them so I can see if it's me interpreting the syntax wrong? Here is the code I put in on the article GreatLakesWiki:Thornapple River

 (A) 42.953125, -85.484061 /Dam\       The Ada dam /Bridge\   The Ada Covered Bridge (C) 42.910297, -85.49921, The Cascade dam (L) 42.883512, -85.475693, Caledonia dam

The marker (A) which should have two tabs is not clickable, that is, the pointer does not change to a finger when you mouse over it, so no balloon comes up. A previous version (in the history) without tabs worked OK. Markers C and L work fine... do I need a comma after the coords? the helps showed it without comma... I think maybe the helps are not quite right, because when I put a comma in, it does change to a finger, but I see text with /dam\ in the balloon and no second tab... if I put nothing after the comma it changes to non fingered (only a drag grab hand) So I'm confused. :) ++Lar: t/c 04:33, 30 November 2007 (UTC)


 * Tabs should be on new lines. I've tried to clarify the docs. --Emiller 08:41, 21 February 2008 (UTC)

Using Properties from Sematic Media Wiki as coordinates?
Hi, I use a database with semantic media wiki. Is it possible to use properties (geographic coordinates) as input for the map? The map should center around the specified coordinate given in the porperty and show a marker. Kai, 2007-10-31

Create a map link not visible?
Be aware that changing the user_options setting showtoolbar to 0 (hiding the toolbar) will also hide your Create a Map link!

You must have toolbar turned on to see the map link.

P.Coghlan (June 12th 2007)

Center cordinates
it would be nice to have a dynamic center coordinate like those made with gpsvisualizer. --130.212.214.242 21:21, 26 April 2007 (UTC)
 * Hopefully I'm barking at the right tree here; I made a quick-hack which zooms and centers automatically after loading all markers.
 * for 0.9.3 add the following bold lines (the other are fore reference) in file export/GoogleMapsJsExporter.php
 * at line 132, add:


 * at line 184, add:


 * at line 239, add:


 * You may want to leave out my auto-center and zoom comments also.
 * Note that this code will alway pan and zoom all of your maps: you might want to add an extra parameter for it.
 * Also note that this only pans and zooms for markers. GPolyline has a getBounds, so you might want to write something that combines all bounds.
 * --84.30.4.215 21:49, 19 May 2008 (UTC)

Mouseover
I have a lot of pins on some pages e.g. Museums in Berlin. To work out which is which, it would be good if just moving the mouse over the pin caused the info window to pop up. Is there an easy way to do that? Kimbooth 09:16, 3 March 2007 (UTC)
 * I'll have something like this in the next big version. --Emiller 19:18, 3 March 2007 (UTC)

What we will have in the next big version? What will be the new features? Lleoliveirabr 23:02, 3 March 2007 (UTC)


 * Bump. Did something like this ever come about and was just edited out? --204.52.215.14 21:18, 29 February 2008 (UTC)
 * Mouseover titles are available since 0.9.2. --Emiller 00:28, 9 April 2008 (UTC)

Fewer tiles
My site is mainly intended for smartphones so data volume is an issue e.g. small map of Berlin. Currently 9 tiles are always fetched, each at about 15 KB. Is it be possible to reduce this to just 4 tiles? Kimbooth 11:13, 3 March 2007 (UTC)

Get directions?
Would it make any sense to have an easy link pointing to google maps to have directions to a certain point? --Jfbeaumont 17:06, 2 March 2007 (UTC)

Can you position the map like you would an image?
for example can I get the text to wrap around an map? if so what code do I need? thanks for the help


 * Use some CSS, e.g.

&lt;div style="float: left;"&gt; ... &lt;/div&gt;

--Emiller 03:20, 27 February 2007 (UTC)

Signing entries using tildes
Question: Is there any way to sign entries using four tildes  ~  so that every member on the wiki can add a point to a map and easily add their name and date to it? Thanks - MediaHound 03:14, 3 November 2006 (UTC)
 * bump MediaHound 01:27, 6 November 2006 (UTC)
 * bump MediaHound 04:04, 13 August 2007 (UTC)

Working with templates
This map is working great on our SingletrackWiki

Does anyone know if there is a way to make MediaWiki read template variables that are within extension code tags? such as:

,

This way, my template could be called by:

Instead of the users having to put in all of those coordinates 3 times, they could put them in once and the template would automatically insert them into a "get directions" link, and into the google map extension tags, and create the map.

Any ideas on how this could be done? I know there have been various "mods" or "patches" for mediawiki that were created, but none of those seem to work with the current version.


 * You can make a template with variables, as you suggested above and use the syntax lat . This will produce the desired output, although it is unfortunately a one shot deal as it copies the text in the page that uses the template when it is saved. Changes to the template will therefore not be reflected on the end pages. This somewhat defeats the purpose, but can at least be used as a tool for users who don't want to mess around with the actual syntax. It still clutters the page, though. Less than ideal. --Charles


 * There's an open bug in MediaWiki about this (including a patch, if you're brave): http://bugzilla.wikimedia.org/show_bug.cgi?id=2257 --Emiller 01:33, 8 January 2007 (UTC)


 * I'm on mediawiki 1.10.1 and i patched parser.php but it still doesn't parse the maps code if i use it in a template. On the #wikimedia channel on freenode i was adviced: "There's a hook for it in the parser. It's a different hook than the normal extension hook. Extensions have to use the new hook if they want the new behaviour. Otherwise, it might break functionality. e.g. uses {} itself", so apparently this could be fixed by just modifying googlemaps code and not waiting for a fix from mediawiki.


 * Now I tested it on 1.11.0, and it completely breaks the wiki after update. Needs to be disabled completely in order for the wiki to work. I'm surprised on one has yet addressed these problems.


 * It would be great to have this. --81.15.51.66 23:53, 4 January 2008 (UTC)


 * Agreed! I wonder why it's not filed under new issues yet? Will it be in the next release? 141.3.165.76 11:12, 1 April 2008 (UTC)


 * I'm actually looking for something similar, but not exact. I've got a template containing a number of locations (i.e. Template:Coordinates, which in turn includes other sub-templates, i.e. Template:Coordinates/Santa Monica), and I want to include that template in the googlemap code.  
 * Is this solution the same as the the one that will fix Mediawiki bug 2257? --NoTea 19:26, 26 January 2008 (UTC)

Add a clickable sidebar?
Love the extension! I was wondering if there was any way that you could have a clickable sidebar that brings up the locations on the map and the corresponding info ballon. For example on my page Chester Wiki I have A for attractions, B for bars and R for restaurants. Is there anyway of adding the points into empty divs named sidebar1 sidebar 2 and sidebar3?

For example...This tutorial.

appreciate it might me a bit too much but any help would be great. Thanks

Installing stops MediaWiki from creating output
I installed the extension as per the basic three steps, but as soon as I complete the edit to LocalSettings, it completely stops the Wiki from operating (I just get an empty white page). Commenting out the two entries in LocalSettings gets the Wiki working again, what might I have done wrong? Thanks, Simon 193.82.116.2 16:38, 27 March 2007 (UTC)
 * Hard to diagnose without more info. Look into your server's error log, or look at How to debug, it contains much more info which should help you diagnose the problem. --Tbleher 14:23, 29 March 2008 (UTC)
 * I had this same problem, checked the logs as Tbleher suggested -- Turns out I'd unzipped the archive directories into the wiki root directory instead of into "extensions": so when php called the include, it couldn't find the file, and the page "build" failed. (eyeroll) Silly me. Thanks for the log suggestion, though: everything runs fine now. :)  Best! -- Diane Duane at youngwizards.com/ErrantryWiki  --84.235.171.246 10:13, 26 April 2008 (UTC)

Heyup
Love it. Pretty straight forward. Of course it would be nice to be able to get a new LAT/LON from messing around with the map, but for now I can paste them in from google links.

However, have you considered letting us specify the colour of the waymarker for the entries we make?

http://www.lundman.net/wiki/index.php/Tokyo

Thanks for your excellent code.

Ohh actually. This is unlikely, but I must admit it would be nice if you have a point, which leads to a page, to be able to have a return link "map" that takes you back (that's easy) and selects/centers the map point in question (harder) ...


 * Maybe you can figure out how to open links in a separate window? --Emiller 02:43, 22 October 2006 (UTC)

Possible to change the size of the bubble?
I am wondering if there is possible to change the size of infowindow?

Embedding Video
Is there any way I can embed video? I already installed videoflash but it doesn't look like works in the google map.
 * Other extensions will not work inside the google map. Not sure if this is fixable, but I'll check. --Emiller 09:36, 28 February 2008 (UTC)
 * Try embedding video with Version 0.9.3. It should work now. --Emiller 00:30, 9 April 2008 (UTC)

Filter options
Filtering places by time frame, category etc. would be very interesting. Something like:
 * show only objects between 1800 and 1900.
 * show only objects with certain category (does not have to be the MediaWiki categories).
 * show only objects of a certain area.

A format could be: time:1800 category:castle area:germany

The extension would collect all this information and created comboboxes, just like within the editor.

time: 1700   1800  1900 category:  castle   palace   village area: germany   austria   hungary

Would this be hard to implement?

Zip Code Layer
I would like to add a zip code layer to my google map(s). I've seen this feature in the control area of the map on a few sites. Is this possible to add?

Labels on Markers and Area overlays
Hi, Aside from the basics, I'm not an expert of what is possible with Google Maps, but if I explain what I would like to do, perhaps someone could explain if it is posisble with this extension (or at all)? I would like to create a Google map where text labels hover alongside the markers. That is, the labels display without mousing over or click for the bubble. Is that possible?

Also, I'd like to create regional overlays - where as soon as the mouse enters a region of the map, the area changes colour and a clickable bubble becomes available for the region.

Basically I want to use a google Map as a powerful form of imagemap for site navigation purposes. I know I can put links into the bubbles, but I'm trying to make it as simple as possible for users. Having floating labels and being able to link out to demarcated regions would help a lot. Is this possible with GoogleMaps and this extension in particular?

Thanks Jon - www.peakbagging.co.nz 130.195.86.37 23:38, 28 May 2008 (UTC)

Filtering Map Data
I have a need to filter the data of a map based on a users input (ie: checkbox). Is this possible with this extension? Are there any examples?

Thanks, Will  67.191.153.88 20:11, 22 June 2008 (UTC)

(HALF-RESOLVED) Change link color in baloons?
[My wiki] uses light gray text & links. I can change the text color in the baloon, but how do I change the link color? "Span class" doesn't seem to for the links. -- töff 00:35, 18 September 2008 (UTC)


 * Ah, found it! Thanks to another comment on this page, I came up with this:

div.gmapinfowindow { color: #565656; } div.gmapinfowindow a { color: #990000; } div.gmapinfowindow a:visited { color: #990000; } div.gmapinfowindow a:active { color: #ff8080; } div.gmapinfowindow a:hover { color: #ff0000; }
 * That results in a nice dark gray text with red links, which matches my wiki skin. Thanks go to the anonymous poster! -- töff 01:06, 18 September 2008 (UTC)

Crap, but it doesn't work with external or interwiki links :\ ... div.gmapinfowindow { color: #565656; margin:0px; padding:0px; border:0px;} div.gmapinfowindow a { color: #990000; } div.gmapinfowindow a:visited { color: #990000; } div.gmapinfowindow a:active { color: #ff8080; } div.gmapinfowindow a:hover { color: #ff0000; }

div.gmapinfowindow a.extiw { color: #990000; }             <<--- NOT WORKING div.gmapinfowindow a.extiw:visited { color: #990000; }     <<--- NOT WORKING div.gmapinfowindow a.extiw:active { color: #ff8080; }      <<--- NOT WORKING div.gmapinfowindow a.extiw:hover { color: #ff0000; }       <<--- NOT WORKING div.gmapinfowindow a.external { color: #990000; }          <<--- NOT WORKING div.gmapinfowindow a.external:visited { color: #990000; }  <<--- NOT WORKING div.gmapinfowindow a.external:active { color: #ff8080; }   <<--- NOT WORKING div.gmapinfowindow a.external:hover { color: #ff0000; }    <<--- NOT WORKING Grr hmm. -- töff 04:20, 18 September 2008 (UTC)

KML Import Issues
Two things; I uploaded a kml to my wiki and specified it as the URL for the KML in the editor map and it spits out an "Unable to Load XML" error. Is it possible to store the KML file in a wiki? Secondly, I tried linking to a rather large kml file (about 17MB) and while the Google Map extension didn't spit out any errors - the information stored in the file never loads on the map. Is there size limit I should avoid?

display:none problem
This problem manifested itself when Google Maps extension was used along with Extension:Header Tabs - when inserted into the dive with, map is freaking out since the div is zero size.

This can be fixed by setting size option of the map when GMap2 constructor is called. See Google Maps API docs: http://code.google.com/apis/maps/documentation/reference.html#GMap2

See email discussion about it (original problem was observed on Semantic Google Maps extension: http://groups.google.com/group/semacomm-dev/browse_thread/thread/4f8ff426a1b3f3b3

Is there a max data that could be included in this extension ?
Hi everybody !

I'm using this extension for my scouting wiki, since many month, but till my new update (0.9.2 then 0.9.3), some of my pages seem too heavy to be shown with the map.

For example: http://fr.scoutwiki.org/Cat%C3%A9gorie:Groupes_par_r%C3%A9gion_fran%C3%A7aise When you remove half of the data, the map is show... but else, there is a white space for the map, but nothing...

Trouble is: the limit wasn't there before (0.8). So where can I increase this limit ? I really need all these data.

Please help :-)

Cedsib 18:12, 2 June 2008 (UTC)

Shadows and overlay graphics are funky in Editor
I'm currently experiencing missing graphic pins and shadow tiles when I use 0.8.0 w/ 1.8.2 Mediawiki and can't seem to figure it out. Here is a screenshot of the behavior. Note the "blank" tiles around pins are missing overlays. Any ideas? --Geowhite00 00:27, 27 September 2007 (UTC)



Extension wouldn't work in Firefox2
I have a 1.9.2 Mediawiki install with Google Maps extension 0.8.0. In case of Safari the "Make a map" image is broken (as described), but in Firefox2 the link wouldn't do anything (non responsive). Oddly the Demo site works as advertised. Maybe it is a newer version? It even displays a warning note for Safari users.--Angelday 06:54, 10 September 2007 (UTC)

I get the following error in JavaScript onClick: "EditorsMap is not defined onclickindex.php (line 102) [Break on this error] emap = new EditorsMap(editors_options);"--Angelday 07:42, 10 September 2007 (UTC)


 * Sounds like it's not finding EditorsMap.js correctly. Do you have special rewrite rules? The file should be accessible from WIKIROOT/extensions/GoogleMaps/EditorsMap.js. --Emiller

Not working well with cite.php
When the map is below pairs they do not appear on the page. When it's above them they appear. Page to look at is here. Feel free to experiment by copying it to the sandbox there.

Obviously the map at the top of the article is awful layout


 * I second this. The reference numbering gets reset whenever a appears. Thus the former references refer to the wrong stuff. Example here. Has it been fixed in recent versions? Did not find anything in the 'Resolved' section. Oliver 15:09, 20 June 2008 (UTC)


 * If you guys transclude the map, does it still happen? Maybe if the map code is on another page, it won't interfere with Cite. Just a thought, easy to try. --töff 14:54, 26 October 2008 (UTC)

Undefined index errors
There were a bunch of these, taking up a lot of room on this page. I think I've put these to bed in 0.7.6. If you're still getting a warning, please post here. You can refer to the old errors in the Extension_talk:Google_Maps/Archive.


 * By applying the fix below on this page I was able to get rid of those "Undefined offset" notices. But I still get "Undefined index: E in /.../GoogleMaps.php on line 345" (line 349 with applied offset-fix). The "E" comes from the icon name in "(E) 42.711618, -73.205112...". So for every icon name occurrence this error is reported. --141.80.190.67 16:08, 20 June 2007 (UTC)

I get this icon problem with the example code from the syntax page http://www.mediawiki.org/wiki/Extension:Google_Maps/Syntax. When putting this in as a test I get this Notice

Notice: Undefined index: S in wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 486 -- 88.110.60.130 21:58, 2 October 2007 (UTC)

Line 513
"Notice: Undefined index: A in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513"; this seems to be intermittent!? Here's my page: http://wiki.paleravens.com/index.php?title=Danner_Building -- töff 15:26, 16 September 2008 (UTC)


 * Here's another instance I'm using: http://wiki.paleravens.com/index.php?title=Manhattan


 * This seems to be intermittent!? is definitely intermittent and seems not even to depend on whether the code has been changed or not. I thought it might be appearing when I'm not logged in, but that's not it, either. I can't pin down the circumstances under which this error arises.


 * I get a syntax error for every point and label in the map code. This ...

 (D) 40.798786, -73.953513 The Danner Building, a vampire enclave (L) 40.807335, -73.945666 The Lenox Lounge (J) 40.766579, -73.989449, Jody Bachev's digs Jody Bachev's digs. (M) 40.782491, -73.980432 Manhattan Diner (T) 40.796319, -73.934092 Tenesha lane's apartment. (A) 40.80752, -73.946478 Jasmine's abduction point.
 * ... results in this (screen shot @ right): [[Image:Googlemaps513.jpg|200px|right]]

Notice: Undefined index: D in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: L in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: J in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: M in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: T in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: A in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: D in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: L in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: J in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: M in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: T in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513 Notice: Undefined index: A in /home/arcticco/public_html/paleravens/wiki/extensions/GoogleMaps/GoogleMaps.body.php on line 513
 * Otherwise it's working great, but those error lines are really annoying. Have I got my code screwed up somehow? I've checked a hundred times! -- töff 14:18, 18 September 2008 (UTC)

It happens in my application, too but it is easy to fix: philipp@colleen:~/www/winterrodeln.org/mediawiki/extensions/GoogleMaps$ svn diff Index: GoogleMaps.body.php

=
====================================================== --- GoogleMaps.body.php (Revision 44960) +++ GoogleMaps.body.php (Arbeitskopie) @@ -510,7 +510,7 @@                    }

// need to create this icon, since we haven't already -                   if( $icon && !$icons[$icon] ) { +                   if( $icon && !isset($icons[$icon]) ) { $exporter->addIcon($icon, $o); $icons[$icon] = true; } This works perfectly for me - just one minor change to one line. By the way, I'm using markers that contain several letters (example "(Haltestelle) 47.300468, 10.915198"), see (German) http://www.winterrodeln.org/wiki/Winterrodeln:Landkarte for a working example with user defined icons.

Editor works, but no visible map after preview/save (v0.7.3)
The map editor works beautifully while in edit mode, but after I paste the code and preview/save it, there's nothing there!
 * MediaWiki version: 1.8.2
 * Browsers tested: Firefox 1.5/2, IE7 & Camino 1.0, Safari 2.0

Here's the error (from Firefox 2) function makeMap1 {    if (GBrowserIsCompatible) {         var map = new GMap2(document.getElementById(&#8220;map1&#8221;)); map.setCenter(new GLatLng(30.298204, -97.761841), 12, G_NORMAL_MAP);   GEvent.addListener(map, &#8216;click&#


 * --Samuraispy 19:22, 26 October 2006 (UTC)


 * Weird. Does the error also have something like %%BEGINJAVASCRIPT, or not? Is there a URL I can look at? --Emiller 02:52, 27 October 2006 (UTC)


 * I'm having the same problem. MediaWiki version: 1.10.0, Firefox 2.0.0.4, IE7. I'm seeing an error in IE7, "Unterminated string constant" (line 74, Char 588). The source of the error is the same as above (this is line 74, which I'm breaking up and indenting for readability):

function makeMap1 {  if (GBrowserIsCompatible) {    var map = new GMap2(document.getElementById("map1")); map.setCenter(new GLatLng(42.758357, -73.197784), 12, G_HYBRID_MAP); GEvent.addListener(map, 'click', function(overlay, point)    {       if (overlay)        {         if (overlay.tabs)         {           overlay.openInfoWindowTabsHtml(overlay.tabs);         }         else if (overlay.caption)         {           overlay.openInfoWindowHtml(overlay.caption);         }       }     } ); map.addControl(new GMapTypeControl); map.addControl(new GSmallMapControl); marker = new GMarker(new GLatLng(42.74323, -73.178558), { 'icon':GME_DEFAULT_ICON }); marker.caption = '
 * A page that can be looked at is at: my private-ish wiki. Account creation and anonymous editing are both disabled, but please let me know if you want an account to work further with the install/environment. malcolm DOT gin AT gmail DOT com works. Thanks very much in advance for any help! --Malcolm Gin 22:15, 14 July 2007 (UTC)
 * P.S. I am using your 0.7.7 beta version of the Google Maps Extension. --Malcolm Gin 22:16, 14 July 2007 (UTC)
 * P.P.S. I think I found the problem, but I don't know PHP or Javascript enough to fix it. After looking at the PHP for the extension (I have no problems reading PHP, just not a lot of practice coding it), and looking at the output for my page, it looks like there are extra linefeeds in the function output for the caption. The continuation of the above code I indented, etc., is (I'll mark newlines/linefeeds as "\n":

\n One \n '; map.addOverlay(marker); marker = new GMarker(new GLatLng(42.7339, -73.197784), { 'icon':GME_DEFAULT_ICON }); marker.caption = ' \n Two \n '; map.addOverlay(marker); marker = new GMarker(new GLatLng(42.735413, -73.229713), { 'icon':GME_DEFAULT_ICON }); marker.caption = ' \n Three \n '; map.addOverlay(marker); map.addOverlay(...trucnated for pre tags...); GME_DEFAULT_ICON = G_DEFAULT_ICON; } else { document.getElementById("map1").innerHTML = "In order ... truncated ..."; } } addLoadEvent(makeMap1);\n
 * I assume, but don't know, that the linefeeds in the middle of the string literals are what's messing up the parsing of the map function and the display of the map. So, how to fix it? --Malcolm Gin 23:15, 14 July 2007 (UTC)
 * P.P.P.S. Feel free to edit the long lines in the &lt;pre&gt; to fit the page. I'm submitting the data that way so the linefeed positions are clear. --Malcolm Gin 23:16, 14 July 2007 (UTC)
 * P.P.P.P.S Looks like other people have had this issue too. I'll see if I can't haxxor your PHP for my own use with respect to this issue. Apparently the goal is to convert all linefeeds to '\n'. --Malcolm Gin 23:54, 14 July 2007 (UTC)
 * Found the problem: I'm using  (which is not default behavior) in my LocalSettings.php to make ParserFunctions.php work. So unfortunately it looks to me like I have to either figure out if there's a subtle way to get this extension and ParserFunctions to work together, or I may have to choose between one or the other. --Malcolm Gin 00:26, 15 July 2007 (UTC)
 * To clarify once again as I try to iron all this out, ParserFunctions generally works okay without $wgUseTidy enabled UNLESS one is using certain templates that generate tables dynamically based on parsed values. Since I'm doing that, that's why I've had to have $wgUseTidy enabled (without that, the HTML tags used - Wiki tables parse too late, I think - get HTTPencoded and display as &lt;p&gt;, et al., thus messing everything up). I'm by no means totally done looking into this conflict, but it seems more and more likely I'll have to choose between the two extensions. --Malcolm Gin 02:26, 15 July 2007 (UTC)
 * I think this has been fixed in 0.8, please try it and report back. --Emiller 09:57, 6 August 2007 (UTC)
 * Actually I ran into the same problem and it is almost fixed in 0.8. The link in the message 'incompatible browser' formats incorrectly to:  (You can edit this to see the exact text, it is still formatting using "nowiki") I just removed the link from the message to fix mine, I saw the section about correcting $text if using Tidy but I don't have the knowledge to correct the message.--69.47.201.6 10:10, 8 December 2007 (UTC)
 * OK, I think this problem is solved in 0.9. Try it out. --Emiller 00:31, 9 April 2008 (UTC)
 * Is anyone still having this problem? I'm running 0.9.3 and it still occurs. It's definitely related to useTidy, because I'm okay when I set it to 'false,' but it's only been a problem since I upgraded my server's version of PHP. Is there an extension missing, or a safety feature enabled, that would cause the discrepancy between versions? Unfortunately I still need the tidy extension for now. Joezoo 12:56, 25 August 2008 (UTC)
 * I'm having this problem as well. I'm running 0.9.3 with MW version 1.8.2. When useTidy is set to false, the map displays fine. When it's set to true, Tidy seems to stick some hard returns into the Javascript, and the map doesn't display. I have a test bed for my website and would be happy to provide Emiller with access to it for the purpose of debugging this. This is a really great extension, and I'd love to enable it on our site if we can get it working with Tidy. --Sheldon Rampton 04:32, 28 September 2008 (UTC)

Error:addLoadEvent is not defined
We have been using the Google Maps Extension 0.7.4 without problems for a while. I recently upgraded to MediaWiki 1.8.2 and installed the Semantic MediaWiki extension. Now in Firefox we are getting the error "Error:AddLoadEvent is not defined. And of course no map is drawn. Here is an example page http://www.archiplanet.org/wiki/109--115_Wood_Street

Here is a page showing the wiki tags we are using, the HTML source of a broken map page and the HTML source of that page back when it worked. It looks like the first couple sets of script tags are missing including the one where it calls Google Maps. I tried putting the map code on a page that doesn't use Semantic MediaWiki and the error still occured. I tried turning off SMW and the error still occured.

I have fixed it for now by commenting out both instances of "$wgGoogleMapsDidInsertEssentialJs = true;" in GoogleMaps.php. This causes it to load the initial script stuff for every map on the page, rather than only once as is intended, but for some reason it was not loading at all for me. It seems to work with multiple instances of that code in the browsers I have tested (Safari and Firefox).


 * The same is the case with SpamBlackList extension for mediawiki. Example on http://www.skipper2skipper.com. If blacklist extension is enabled, the GoogleMap javascript is not included in the page and no map is displayed. I have also disabled caching by commenting out $wgGoogleMapsDidInsertEssentialJs = true; (there are 2 instances) and all seems to be well. I guess it will need to be addressed at some stage as it does affect a few extensions, but the above fix should work in the short term. --Skipper 18:05, 6 January 2007 (UTC)


 * Possibly fixed in 0.8. Please let me know. --Emiller 22:48, 26 February 2008 (UTC)

Performance issue
Very cool extension, works for me but... with this extension installed the time it takes for the "edit" page to load jumped significantly to a few seconds. (from sub second load time) This is fine for an experiment but not for a production site, since 99.9% of page edits won't be for maps, users shouldn't have to pay this overhead in usability expense for a mapping feature.

I believe the added load time is probably due to the "fetching" of remote images and script files from google.com. A fix that would work for me is to only fetch the remote files and scripts when a user really wants to make a map (clicks on the "make a map" link). (and/or cache these images and scripts locally) Otherwise get nothing from google and spare everyone the wait. --Maxelrod 17:58, 13 April 2007 (UTC)


 * I really have to agree with Maxelrod on this - very cool extension and I'd love to use it, but the slow down on each page edit is too much especially on an active wiki. I second the idea of fetching remote files only when the button/link is clicked on. --Chrys 19:17, 2 December 2007 (UTC)


 * I agree too. The extension will be fit for production sites by version 1.0. (Before you ask, 1.0 will be ready when it's ready.) --Emiller 22:45, 26 February 2008 (UTC)


 * As of Version 0.9.2, remote files are only fetched after the button is clicked. --Emiller 00:33, 9 April 2008 (UTC)

Search box doesn't seem to work
In addition to the previous point, the search box doesn't seem to work. When I enter something, it searches for a couple of seconds, but then produces no results. Hensa 15:37, 10 May 2007 (UTC)
 * Can you give a specific test case? --Emiller 22:41, 26 February 2008 (UTC)

Little Error on my code
When I make a point in my map, there are a code for wiki.

my code appear like below,

 35.678982, 139.715881 35.683793, 139.724207 35.689649, 139.70953

Snapshot for my error code http://jwiki.biz/code.png

there are code arround my code. (I think it shouldn't have it)

and when I copy the code, and paste it.. it goes

35.678982, 139.71588135.683793, 139.72420735.689649, 139.70953

Several code are stick together... so, I have to make them separate by my self.

What's wrong?? Is there any way to fix it?


 * Try a different browser. This will be fixed properly in 0.9.0. --Emiller 08:27, 21 February 2008 (UTC)


 * Problem still exists in Version 0.9.3.

When a marker is removed within a path
Then, the point is not removed form the list like it is for a marker without path. Obviousely, the distance is not recalculated, but the distances are not correct, see above. Must be corrected. Thank you.

Problem with hooks in Xoops MediaWiki module
I'm running a Xoops CMS, with MediaWiki module in it. It's a 1.71 MediaWiki version hooked to work as a module in Xoops. When I install this extension I get following error message on any wiki page:

Unknown datatype in hooks for ParserAfterTidy Backtrace: #0 C:\xampp\htdocs\xoops\modules\mediawiki\includes\Parser.php(352): wfRunHooks #1 C:\xampp\htdocs\xoops\modules\mediawiki\includes\OutputPage.php(369): Parser->parse('ParserAfterTidy', Array) #2 C:\xampp\htdocs\xoops\modules\mediawiki\includes\GlobalFunctions.php(573): OutputPage->parse('This page has b...', Object(Title), Object(ParserOptions), true, true, NULL) #3 C:\xampp\htdocs\xoops\modules\mediawiki\includes\Skin.php(896): wfMsgExt #4 C:\xampp\htdocs\xoops\modules\mediawiki\templates\Xoops.php(189): Skin->pageStats('This page has b...', true, true) #5 C:\xampp\htdocs\xoops\modules\mediawiki\includes\Skin.php(581): SkinXoops->doAfterContent('viewcount', Array, '1,812') #6 C:\xampp\htdocs\xoops\modules\mediawiki\templates\Xoops.php(246): Skin->afterContent #7 C:\xampp\htdocs\xoops\modules\mediawiki\include\XoopsOutputPage.php(199): SkinXoops->outputPage #8 C:\xampp\htdocs\xoops\modules\mediawiki\include\XoopsOutputPage.php(136): XoopsOutputPage->outputxoops #9 C:\xampp\htdocs\xoops\modules\mediawiki\includes\Wiki.php(250): XoopsOutputPage->output(Object(XoopsOutputPage)) #10 C:\xampp\htdocs\xoops\modules\mediawiki\index.php(124): MediaWiki->finalCleanup #11 {main} Retrieved from "http://localhost/xoops/modules/mediawiki/index.php/Main_Page"

Now, I am not good neither in php nor MediaWiki, but I tried to comment from line #130 to #134 in GoogleMaps.php

if( isset( $wgHooks['ParserAfterTidy'] ) && is_array( $wgHooks['ParserAfterTidy'] ) ) { array_unshift( $wgHooks['ParserAfterTidy'], array( $wgGoogleMaps, 'commentJS' ) ); } else { $wgHooks['ParserAfterTidy'] = array( array( $wgGoogleMaps, 'commentJS' ) ); }

and it worked while pages were shown, but when I went to edit page, added  tag, and did the preview, I got the dump of text, obiously not transformed form object to HTML...

So, do you have any idea what should go wrong? Thanks!

--Bojan
 * Yes, this will be fixed in 0.9.2. Or you can upgrade your MediaWiki to 1.8 or later. --Emiller

Wrong shadow for custom marker icons
I set the markers on my map to use some of the other icons Google has available (see here). Each of these has an accompanying shadow image. But in the GoogleMaps generated map, the shadow is that of the basic marker shape, which looks a bit funny - any ideas? thanks! --Zabwung 17:38, 7 January 2008 (UTC)

Same problem for me. --Andrea

UNIQ QINU
I've just installed this extension, and the problem now is that when i get a Map in a page, it only appears a code like this: �UNIQ5de16d323c59ce33-googlemap-00000001-QINU ¿how could i fix this?

thank you


 * What version of MediaWiki? --Emiller 17:02, 29 January 2007 (UTC)


 * I'm getting this problem as well. I'm running MediaWiki 1.9.3. --Lev 26 March 2007
 * Note that, after checking Extension:Google_Maps/Compatibility, I noticed that the GoogleMaps extension hasn't been listed as compatible with MediaWiki 1.9.3. (I've also had trouble with other tags rendering as "UNIQ....," so I'm not sure that this was a problem with the GoogleMaps extension.) I'm going to switch my site to the most recent legacy software (1.8.2?) and see if that works. --Lev 27 March 2007


 * Not sure if this counts as "Resolved." The problem is NOT with the GoogleMaps extension. It's a problem with the php.ini file on your host provider. WikiMedia's Bugzilla bug tracking system helped me find this MediaWiki UNIQ bug. After carrying out their recommendation, the GoogleMaps extension (as well as other tags like &lt;nowiki&gt;) works just fine. Note: I'm using MediaWiki stable 1.9.3. --Lev 28 March 2007

php error after installing v0.9.1
I'm using mediawiki 1.6.7 and php 4.4.2-1.1 and I've been using version 0.7 of the google maps extension for some time now. Replacing the GoogleMaps folder with the new files from 0.9.1 I get on calling any mediawiki page (and just that):
 * Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in
 * /home/www/web111/html/w/extensions/GoogleMaps/GoogleMaps.body.php on line 25

If I counted correctly the line 25 is the first line with a command:
 * l.19--->class GoogleMaps {
 * l.25---> 	const PARSE_INCLUDES = 0;

Is the php version the problem? Can I update to version .9, though my webspace provider offers this old php version? Or might there be another problem. I did apply the "Colored paths"-changes to my mediawiki, and it worked with v.7. I hope someone might know better than I do, what this error message says. And thanks again for the great extension. And I can't wait to use the new kml features. -- JanCK14:18, 28 February 2008 (UTC)

php4 problem
http://www.phpbuilder.com/board/showthread.php?threadid=10326746 says that he got the same problem as he didn't know that classes were handled differently in php4 in contrast to php5. http://www.bestofjoomla.com/component/option,com_fireboard/Itemid,38/func,view/id,44220/catid,68/limit,10/limitstart,30/ also has an example with the same error message resulting from a php4-php5-difference. -- JanCK 01:38, 29 February 2008 (UTC)
 * http://hubpages.com/hub/RootShell suggest, that the const keyword for defining class constants isn't available in php4. I don't know how to implement this line in that way that PARSE_INCLUDES becomes a class constant in php5 and a usual constant in php4. -- JanCK 01:51, 29 February 2008 (UTC)


 * FIXED in 0.9.3 --Emiller 00:34, 9 April 2008 (UTC)


 * In 0.9.3 I get
 * Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/www/webxxx/html/w/extensions/GoogleMaps/export/GoogleMapsJsExporter.php on line 244
 * so I deleted the "static" keyword right before line 244 and in line 266. Then I got:
 * Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/www/webxxx/html/w/extensions/GoogleMaps/GoogleMaps.body.php on line 423
 * So I deleted the static in line 421. And in 553, 575, 593, 680, 771, 897, 909, 914, 928.
 * That worked. At least I got displayed my mediawiki start page. I'll now go on and check whether I can edit maps and export to kml. I don't speak php, so I'm not sure what I did by deleting the static keywords. I hope that's just a minor performance issue. Thanks again, for the great work. The extension is great, and I'll be real happy if kml export works for me now. -- JanCK 13:22, 9 April 2008 (UTC)
 * Hm, doesn't work yet. Clicking on any edit link results in
 * Fatal error: Undefined class name 'self' in /home/www/webxxx/html/w/extensions/GoogleMaps/GoogleMaps.body.php on line 150
 * Oh, I see there are loads of "self"s and I don't know whether I can maybe change them to this->? Okay, I just read "self is the static analogy to $this, and parent:: is how you call a parent class's function, useful in constructors." at . Just changing line 150 into
 * $o = $this->getMapSettings( $this->mTitle, $this->mMapDefaults );
 * allows me to display the edit-page. I can then use the map editor in the current firefox. On clicking submit, however, I get:
 * Fatal error: Undefined class name 'self' in /home/www/webxxx/html/w/extensions/GoogleMaps/GoogleMaps.body.php on line 397
 * The is not the next occurrence of self which is in line 316. But maybe that isn't called. So I did a replace all "self::" by "$this->" which replaced 15 further "self"s. Having done that I can display the pages without maps, but I can't display the pages with maps anymore. Those give me
 * Fatal error: Undefined class name 'self' in /home/www/webxxx/html/w/extensions/GoogleMaps/export/GoogleMapsJsExporter.php on line 161
 * To my surprise the error occurs at line 161 though there is a self in line 160. Here are lines 160 and 161:
 * $mapType = self::convertMapType($o['world'], $o['type']);
 * $mapTypeArray = self::getMapTypeArray($o['world']);
 * Those were the only two occurences of self in GoogleMapsJsExporter so I changed them to
 * $mapType = $this->convertMapType($o['world'], $o['type']);
 * $mapTypeArray = $this->getMapTypeArray($o['world']);
 * Now I can display pages without maps and pages with maps. AND the maps changed. Before the last change I this had the old options "map"/"sat"/"hybrid". Now I've got the new version "map"/"terrain"/"sat"(with/without labels). Maybe there was a caching problem, that allowed my to display the page with maps earlier on. I can edit the page with maps. I can start the map editor. Oh, and I just realize that even though I got the error page when clicking the submit button. The page got saved then. I can also now submit my edit without getting an error. Calling Special:Specialpages I get:
 * Fatal error: Call to a member function on a non-object in /home/www/webxxx/html/w/includes/SpecialPage.php on line 210
 * Line 210 in that file is:
 * if ( $page->isListed ) {
 * within the function:
 * function getPages {
 * global $wgSpecialPages;
 * $pages = array(
 * '' => array,
 * 'sysop' => array,
 * 'developer' => array
 * foreach ( $wgSpecialPages as $name => $page ) {
 * if ( $page->isListed ) {
 * $pages[$page->getRestriction][$page->getName] =& $wgSpecialPages[$name];
 * }
 * }
 * return $pages;
 * }
 * So I guess, know I have to understand how the Specialpage are hooked. .... and as my lunch is getting cold just now, I think I'll postpone that. -- JanCK 14:01, 9 April 2008 (UTC)
 * Calling http://domain.com/wiki/Spezial:GoogleMapsKML yields into:
 * Fatal error: Call to a member function on a non-object in /home/www/webxxx/html/w/includes/SpecialPage.php on line 272
 * l272 is in function executePath( &$title, $including = false ) with a call $page->including( $including );. -- JanCK 14:12, 9 April 2008 (UTC)
 * Hm, I thought maybe changing 	$wgSpecialPages['GoogleMapsKML'] = array('GoogleMapsKML','GoogleMapsKML'); to $wgSpecialPages['GoogleMapsKML'] = array('GoogleMapsKML'); in reference to might help. But it didn't change much. It seems to me the class GoogleMapsKML isn't loaded though SpecialGoogleMapsKML.php is in the include path. hmmm? Dunno. -- JanCK 14:30, 9 April 2008 (UTC)
 * Writing nonsense into SpecialGoogleMapsKML.php yields an error right away on loading any page of the wiki. So the file seems to be processed. -- JanCK 14:35, 9 April 2008 (UTC)
 * Also changing the line to $wgSpecialPages['GoogleMapsKML'] = 'GoogleMapsKML'; as I saw here didn't change anything. http://www.mediawiki.org/wiki/Manual:Special_pages also says: It should be pointed out that the method used below will not work on PHP 4: it depends on "class autoloading" which was introduced with PHP 5. Special pages written in this style are therefore not necessarily compatible with MediaWiki prior to version 1.7.0: if using an earlier version of MediaWiki on a more-recent version of PHP, upgrade MediaWiki. But I hope that just refers to the line $wgAutoloadClasses['MyExtension'] = $dir . 'MyExtension_body.php';'' which can be and is replaced by an include command. Am I right there? -- JanCK 11:30, 11 April 2008 (UTC)
 * Writing nonsense into SpecialGoogleMapsKML.php yields an error right away on loading any page of the wiki. So the file seems to be processed. -- JanCK 14:35, 9 April 2008 (UTC)
 * Also changing the line to $wgSpecialPages['GoogleMapsKML'] = 'GoogleMapsKML'; as I saw here didn't change anything. http://www.mediawiki.org/wiki/Manual:Special_pages also says: It should be pointed out that the method used below will not work on PHP 4: it depends on "class autoloading" which was introduced with PHP 5. Special pages written in this style are therefore not necessarily compatible with MediaWiki prior to version 1.7.0: if using an earlier version of MediaWiki on a more-recent version of PHP, upgrade MediaWiki. But I hope that just refers to the line $wgAutoloadClasses['MyExtension'] = $dir . 'MyExtension_body.php';'' which can be and is replaced by an include command. Am I right there? -- JanCK 11:30, 11 April 2008 (UTC)

KML Export Broken on Version 0.9.2
I'm Using PHP 5.2.5, MediaWiki version 1.12.0. Out of the box, no modifications to LocalSettings.php (except the requires) using I get the following message when I click the link to export.

Also happens when manually doing "index.php?title=Special:GoogleMapsKML&article=TESTINGTESTING"

Warning: SpecialPage::require_once(/home/trailwik/public_html/includes/SpecialGoogleMapsKML.php) [function.SpecialPage-require-once]: failed to open stream: No such file or directory in /home/trailwik/public_html/includes/SpecialPage.php on line 671

Fatal error: SpecialPage::require_once [function.require]: Failed opening required '/home/trailwik/public_html/includes/SpecialGoogleMapsKML.php' (include_path='/home/trailwik/public_html:/home/trailwik/public_html/includes:/home/trailwik/public_html/languages:.:/usr/lib/php:/usr/local/lib/php') in /home/trailwik/public_html/includes/SpecialPage.php on line 671

For Spits and Giggles, I copied SpecialGoogleMapsKML.php to my includes directory, and was greeted with:

Fatal error: Cannot redeclare class GoogleMapsKML in /home/trailwik/public_html/includes/SpecialGoogleMapsKML.php on line 53 --67.85.243.235 16:21, 29 March 2008 (UTC)


 * Please try Version 0.9.3 and let me know whether it works. --Emiller 00:35, 9 April 2008 (UTC)

Using Alphabet markers breaks KML file (in 0.9.3)...?
Hi,

If I make a marker like this:

(S) 42.711618, -73.205112

And then implement the KML file link, the resulting KML loads with an error about having no root element.

If I take the (S) away, the resulting KML file loads absolutely fine in Google Earth.

Is this a bug?

Thanks 118.92.235.22 03:51, 30 May 2008 (UTC)

Some options in Editor's Map not reflected in code
Hi - First, I think the extension is great. However, the three options on the bottom row of the Editor Map options do not result in any change in the code. For example, when I select 'no' for the satellite/map selector, those buttons still show on the map. Hensa 15:27, 10 May 2007 (UTC)

Sorry, I should say that an example of the map in action is here. Also, I am using Firefox 2 with XP. Hensa 15:33, 10 May 2007 (UTC)


 * I noticed this also. Until there's a fix, you can manually put the syntax tags in. For example,


 * SDDR 04:24, 11 May 2007 (UTC)


 * Fixed in 0.8.0. --Emiller 10:02, 6 August 2007 (UTC)

Change Map Type in Editor
Is it possible to set the Map Type of the Editor Map to Terrain? I'm working with some elevation based stuff and to have the terrain defaulted (or even selectable for that matter) would be very helpful. --204.52.215.14 20:29, 26 February 2008 (UTC)


 * Yes. This is available as of 0.9.0. You may need to do a "hard refresh" to get the new JavaScript file in your browser. (Shift-F5 on most computers). --Emiller 22:40, 26 February 2008 (UTC)


 * Thanks a bunch, that solved it.--67.85.243.235 18:46, 27 February 2008 (UTC)

Error: Undefined variable: wgGoogleMapsTemplateVariables in ./extensions/GoogleMaps/GoogleMaps.php on line 228
It seems like this variable is used before it's ever defined. Line 228: if ($wgGoogleMapsTemplateVariables) { # experimental, see MW bug #2257 Or am I missing something? SDDR 02:54, 29 April 2007 (UTC)


 * Fixed in 0.8 or thereabouts. --Emiller 22:42, 26 February 2008 (UTC)

Call-time pass-by-reference has been deprecated
just started up a new install of MW 1.11 and threw the GM 0.9 extension in. i get a warning now of:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]. If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/server/account/site/extensions/GoogleMaps/SpecialGoogleMapsKML.php on line 43

and...

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]. If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/server/account/site/extensions/GoogleMaps/GoogleMaps.body.php on line 401

"Temporary solution: Just go ahead and remove the leading "&" sign on the parameters in the function calls at the stated lines (line 401 in GoogleMaps.body.php and line 43 in SpecialGoogleMapsKML.php)."

the fix listed above and in an above post works to get rid of errors but i don't know if it fixes the problem. I don't want to create a custom php.ini setup to set allow_call_time_pass_reference to true, because of my host's setup.

Is GM 0.9 compatible with MW 1.11 and php 5+?

Any help would be appreciated.

bye for now... --oktiv 19:58, 26 February 2008 (UTC)


 * Thanks for the bug report. A fix will be in 0.9.1. --Emiller 22:26, 26 February 2008 (UTC)

EditorsMap.js and Mediawiki 1.10.1
I recently upgraded to 1.10.1 and 0.8.0 and now the map editor no longer works. The Google Maps are rendered correctly, just the map editor no longer works.

Firebug throws me a javascript error: this.toggle_link has no properties or emap has no properties in EditorsMap.js. --24.22.120.135 04:06, 9 August 2007 (UTC)


 * I'm seeing this issue too. Firefox 2.0.0.6, MediaWiki 1.10.1, Google Maps Extension 0.8.0. I can't currently corroborate the javascript error (FireBug not installed), but I can tell you that the "make a map" link does not show under the formatting buttons in article edit mode. But extension-related markup is getting parsed correctly during rendering. --216.152.98.1 18:53, 13 September 2007 (UTC)
 * Wait, nevermind. It is because I am an idiot. The make a map works for me just fine. I didn't realize the UI had changed. The button on the formatting toolbar exists on my deployment and the map editor works absolutely fine. Sorry for the false alarm. --216.152.98.1 20:02, 13 September 2007 (UTC)


 * Same problem here. MW 1.11.1 and GM extension 0.9.0. "this.toggle_link has no properties[..]" --BigSmoke 13:41, 22 February 2008 (UTC)
 * Solved the problem. After noticing that this.toggle_link doesn't occur anywhere in EditorsMap.js, I did a diff an found that an old version of the js file was being served from cache. I opened the js file in FF and did a proper reload to refresh the cache. Now, everything's working all dandy and fine. --BigSmoke 13:57, 22 February 2008 (UTC)
 * Starting with 0.9.1, the JS will automatically reload with new versions of the extension. --Emiller 23:36, 26 February 2008 (UTC)

Using a directory of icons
Looking through GoogleMaps.body.php it appears there is some code for listing a directory of icons (search for icondir). I can't get this to work though - is it something actually functional, and if so how can you use it? --Charlener 09:08, 1 September 2008 (UTC)

how do I use different icon sets?
I have 3 / 4 different types of locations (our branches, partners, clients, highsites), and I would like to use different coloured icons for each "group", how do I do this?

Template:Google Maps Extension Info
I think this template should only be used on the main page, because it creates to many entries in the category extension. Since all subpages have a link to the toppage, I do not see any problems here. --GunterS 19:19, 20 March 2007 (UTC)

Storing marker locations in the DB
I wanted to store map marker locations in the database rather than in wiki pages, and have hacked the extension to be able to fetch markers and display them--either all markers in a category, or just one marker by name. Would the diff/patch be of interest at all? Thinkling 22:36, 21 March 2007 (UTC)
 * I have a site with a lot of differently centered maps, but would like to have the same markers/category of marker displayed on all maps, i think your patch may help O1ive 08:32, 14 May 2007 (UTC)


 * I also have markers stored in a database and want to include them into a GoogleMap. Therefore I wrote a separate extension that includes the GoogleMap-extension described here and feeds it with coordinates and descriptions from my database. Using an old version of Mediawiki and the GoogleMap-extension version 0.5.5 everything worked fine. After upgrading my Mediawiki-installation to version 1.11.1 and using the GoogleMaps extension version 0.8.0 I'm not able to get the stuff working. Here's the code of my extension:

<? $wgExtensionFunctions[] = "mcmap"; function mcmap {   global $wgParser; $wgParser->setHook( "mcmap", "renderMcmap" ); } function renderMcmap ( $input, $argv, &$parser ) {   global $wgParser, $wgUser, $wgTitle, $wgOut; $wgParser->disableCache; $abfrage = "SELECT ... "; # my database query $ergebnis = mysql_query($abfrage); while ($data = mysql_fetch_assoc($ergebnis)) {       $myoutput .= "..."; # generation my coordinates and descriptions }   mysql_free_result($ergebnis); global $wgGoogleMaps; return $wgGoogleMaps->render($myoutput, $argv, &$parser, &$parser); } ?>

The last two lines are highly doubtful, the return command causes an UNIQ/QINU error and non of the usual solutions helped me. Any ideas? --Dasaweb 11:19, 5 February 2008 (UTC)

Maps using Category
I would love to see a calendar that linked to multiple Wiki pages using the Category tag. Something like the way this calendar extension works: Extension:Calendar (Barrylb)

You would add pages with categories like this: 	, and then, when you put this tag in: , it would put in markers for each page in the category with a link to the page. --Dfink 06:41, 22 April 2007 (UTC)

GoogleMapsMessages.php accents problem
Hi, this extension is terrific, thank you. Just downloaded, installed 0.7.7, its worky but fr and others lang accents are not printed properly from GoogleMapsMessages.php. I tried both from tgz and zip archive, any clue? Greudin 16:56, 28 April 2007 (UTC)


 * I'll be revamping the language stuff quite soon and will look into this. --Emiller 22:32, 26 February 2008 (UTC)

Parsing google map syntax to a template..
Great extension... !! I have a question that i really hope you can help me out with.

I have created a custom form for users to input information into when they hit the "edit" button. So the traditional bland edit screen isnt visible. Is there anyway i can put the add a map link on this new edit page? and once then link is set it there anyway to parse this value to a text box on the custom edit page?

thanks in advance!!! AJ

Safari can hang on long paths
I have not been able to isolate what the problem is exactly or where the limit is but I have a page with a 10-mile track with track points every 1/6th of a mile, I think. The page will load just fine on my Mac using Firefox but it causes Safari to hang indefinitely and the Finder says it is "Not Responding." This is the page causing the problem:

http://sonomavalleycyclists.org/wiki/index.php?title=Lovall_Valley&oldid=1586

I wish I could identify what it is but I can edit out the path and add it back in pieces and the pieces show. I just don't know where, yet, it decides to balk. I do know this can basically work in Safari because the following page, displays properly:

http://www.xcrides.com/index.php?title=Pian_delle_Bosse

Is it possible there is a limit to the number of points in a track that Safari can support? Could this be a weakness in the extension? Or could my data be malformed in some way?

OK, I started experimenting and found that it works up to 451 track points for this file, if I counted correctly -- I could be off by one. At 452, the previous version of the file, Safari still hangs:

http://sonomavalleycyclists.org/wiki/index.php?title=Lovall_Valley&oldid=1597

I still don't know if this is just a size issue or in some sense due to the fact that much of the second half of the track overlaps the first half.

Chip.R 21:43, 1 June 2007 (UTC)

"Invalid Character" in IE 7.0
I just installed the Extension (on Mediawiki 1.10.0) and everything went smoothly - except the map does not appear in the page after editing. The map editor works great. I copy and paste the code in and hit preview (or save). The resulting page shows an IE error (yellow hazard triangle in the status bar with the text "Done, but with errors on page". If you click the status bar to show the error it shows the message "Error: Invalid character" (with line number and character number).  The character referenced seems to be in the Javascript block generated by the Map extension right near where it says href="\&amp;quot;http  I notice if I take out the whole &lt;a ... &gt; tag (about using a compatibile web broser) save the page to my pc, then load this saved page in IE, the map comes up fine.  Anyone know what this might be?  The symptoms seem similar to an error referenced above (Editor works, but no visible map after preview/save) but different error messages (and causes?).  Any help would be greatly appreciated. Graham 70.18.28.113 00:33, 12 August 2007 (UTC)


 * Should be fixed in 0.9.1 --Emiller 23:32, 26 February 2008 (UTC)

Latitude/longitude in DMS conversion into Decimal degrees?
I am need of suggestions. All my points I want to use are recorded as Degrees Minutes Seconds. IS there a way of inputing this into the syntax and obtaining the correct map? Currently I need to convert all my points into Decimal degrees, point by point. Any assistance is welcomed!


 * I will include this feature in a future version. --Emiller 22:29, 26 February 2008 (UTC)

Have a look at this code. It's based on this Javascript. This PHP version is my work and can be used as is - note that it is loosely based on the original Javascript. Refer to copyright statement on original Javascript page.

Using the FCKeditor integration with MW 1.10.1
The normal MW editor is working fine but by default my users will use the FCKeditor. This editor shows no button for this google maps extension. I would like to know how I can either add the button into the FCKeditor or make some sort of link on the edit page which is outside of the editor area. (like I guess the older version used to use?)

Cache problem
I use Short URL for my MediaWiki installation, therefore I assigned two keys in $wgGoogleMapsKeys:
 * 1) MyIP/wiki/ (short URL, for /wiki/ArticleName)
 * 2) MyIP/w/</tt> (real installed path, like /w/index.php?title=ArticleName</tt>)

Sometimes, the script said that the key is invalid in /wiki/Article which the key for [2] is used instead. I traced and tested the source and found it very weird that some variables are set differently. (For example, in GoogleMaps::commentJS</tt>, the variable $this->mGoogleMapsOnThisPage</tt> is false</tt> in [1], but true</tt> in [2])

Finally, I resolved this problem by disabling some cache mechanism in MediaWiki. However, this is not a good in consideration of the server load. And after I enabled caching, the problem occured again. Is there any way to resolve this problem (and still using short URL)? Or do I need to provide more information?

Ericyu 14:03, 24 September 2007 (UTC)


 * You'd probably register just one key for  and it should work for all subdirectories. Try it and report here whether it works. —62.231.24.202 10:52, 21 May 2008 (UTC)

Using this extension with the FCKeditor
I have to disable the FCKeditor in order to make the extension work because the "make a map" button will not show up anywhere on the edit page dialog with the FCKeditor. Can anyone help me or just give me some way of enabling this extension with the FCKeditor anyway? I'm not asking for full functionality with the FCKeditor or anything. Just a little text link above the editor window would be great! I just don't understand the complexities of the code well enough to get MW 1.10.1 to play with this extension and the FCKeditor integration at the same time!

I guess my problem really is: How can I instantiate the map editor somewhere else besides in the editor? (like maybe below or above it)

FCKeditor renders the tags just fine. I just need to let the user have an interface with which to edit the article since this is essential to the goal of my wiki site. (allowing each user a simple way to add a map to their article).

Thanks again! --68.35.119.165 19:22, 25 September 2007 (UTC) Nate

same here, i think it must be taken up with the fckeditor people though as it is removing the buttons

-oktiv  01nov2007

-UPDATE- someone has come up with a plug-in for FCKeditor because there is no license attached I will only link to the discussion. Please see http://www.fckeditor.net/forums/viewtopic.php?f=5&t=6627&p=17827&hilit=google+maps#p17827 It works fine on a regular website but doesn't format the tags into wiki text. I am wondering if some of the code from the wiki + googlemaps extension can be utilized inside of the FCKeditor plug-in, possibly having them both installed side by side and adding a call to the parser inside of the google maps wiki extension. I don't know enough about js to do this. I am willing to help sponsor this feature. djoktiv@gmail.com

-oktiv  09nov2007

I tried this plugin - but I couldn't get it to work with the particular version of Fckeditor that is customised for mediawiki. version 2.5.1 ; Build 17566 MediaWiki+FCKeditor project. I'm running MW 1.12

This plugin may be assuming the standard version of Fckeditor In the meantime you just have to add the tags manually, no big deal as most of my maps are simply pulling in KML files that I've created with GE. BTW, kmz files work as well :-)

Dkruse 00:39, 4 June 2008 (UTC)

Doesn't work on this wiki
I want to use it, but it doesn't work over here http://stad.wikia.com/wiki/ 82.170.55.126 19:13, 29 September 2007 (UTC)

It works, but when the extension is enabled, I get a 4 lines of code at the top of the page
It won't let me copy & paste it, so here is the link to see what it is doing -

Any thoughts?

--Dyrms86 08:29, 5 November 2007 (UTC)

The lines show "view.atdmt.com" - this is some sort adware - do a search on it in Google. I don't know how to remove it.

KML export problem
Using Mediawiki 1.11.1 Installed extension ver 0.9.1  All worked a treat excpet for KML export. All polylines had the first coordinate repeated at the end of the line, so all the lines became enclosed spaces. ie somehow the first co-ord was duplicated at the end unnecessarily. Also markers are labelled as Point 1, Point 2, etc as opposed to showing the Title of the marker as seen in the Title bubble on the map.

OK thought ver 0.9.2 may contain a fix for the lines. Now clicking on a link to start a KML export this gets displayed:

Warning: SpecialPage::require_once(/home/bbug/public_html/wiki/includes/SpecialGoogleMapsKML.php) [function.SpecialPage-require-once]: failed to open stream: No such file or directory in /home/bbug/public_html/wiki/includes/SpecialPage.php on line 646

Fatal error: SpecialPage::require_once [function.require]: Failed opening required '/home/bbug/public_html/wiki/includes/SpecialGoogleMapsKML.php' (include_path='/home/bbug/public_html/wiki:/home/bbug/public_html/wiki/includes:/home/bbug/public_html/wiki/languages:.:/usr/lib/php:/usr/local/lib/php') in /home/bbug/public_html/wiki/includes/SpecialPage.php on line 646

Figured SpecialGoogleMapsKML.php needed to be in the include directory - so put a copy in there. Fixed above error msg but know get 500 error - page cannot be displayed.

Keep up the good work.


 * Thanks for the bug reports. 0.9.3 should fix the polyline problem, the point labelling problem, and the export errors. Please try it out and let me know. --Emiller 00:37, 9 April 2008 (UTC)

KML export problem 2
KML export working a lot better in 9.3. Couple of minor problems:

1) In general: a leading space in front of a co-ordinate is interpreted as marker syntax. So this will produce an unneeded marker.

2#FF00FF00 -37.874202, 145.091622 -37.874083, 145.093024 -37.873966, 145.094411

May make sense to trim whitespace from the beginning and end of each line?

2) A marker description such as this exported to KML file, which is designed to refer to an image on the wiki server, doesn't work as the URL is relative rather than absolute:

<![CDATA[<a href="/wiki/index.php/Image:IMG_4779_400_300.jpg" class="image" title="Image:IMG_4779_400_300.jpg"> <img alt="Image:IMG_4779_400_300.jpg" src="/wiki/images/6/6f/IMG_4779_400_300.jpg" width="400" height="300" border="0" /></a> ]]>

3) Using IE7: When a user clicks on a KML download and uses the "Save" button, it all works fine. But the "Open" button doesn't work - Google Earth states the file cannot be found in the cited local temporary internet folder and correctly so - the file is not there. No idea why this happens. As expected it all works perfectly in Firefox. The server has the mime types all set correctly for KML

4) All marker titles now act as wiki page titles - so titles are in red indicating there is no wiki page of that name. Title will be in blue if there is a wiki page of that name. May be this was intended? - which may make sense. However, could a switch be put in to turn it off, which is my preferred presentation. A wiki page link can always be inserted in the description.

5) If you don't want the driving directions presented to you in the bubbles, then set up the BalloonStyle like so in the exported KML:

<Style id="xyz"> <BalloonStyle> <![CDATA[ $[name] $[description]]]> </BalloonStyle> </Style> Thanks once again.

KML export problem 3
I'm using MediaWiki: 1.10.1 with PHP: 5.2.5. The KML features all work except for export. The problem seems to be in the creation of the Special:GoogleMapsKML page. I get the following error when I click on a 'download KML' link:
 * "You have requested an invalid special page, a list of valid special pages may be found at special pages list."

GM plugin - mmmmm good stuff

 * I wanted to set the version of the Google API to 2.x, which as I understand it, always makes use of the latest GM API. However array element $o['version'] is set to a floating point number, whereas 2.x is a string. So when I set the override in LocalSettings.php I got a: "Parse error: syntax error, unexpected T_STRING". I would have thought the type casting would straightened things out but apparently not. I then tried to define $o['version'] as a string '2.85' but that didn't appear to work either. No errors but the override in LocalSettings.php didn't work. It is possible the browser's page cache might not have shown the update. Any thoughts on this?
 * This is a syntax error in your LocalSettings.php. --Emiller 08:32, 21 February 2008 (UTC)

openInfoWindowTabsHtml(overlay.tabs); overlay.openInfoWindowHtml(overlay.caption);
 * Would also like to see the help bubble size controlled, so it remains inside the map. The existing code:

Could be altered to: openInfoWindowTabsHtml(overlay.tabs, {maxWidth:var_w, maxHeight:var_h, autoScroll:true} ); overlay.openInfoWindowHtml(overlay.caption, {maxWidth:var_w, maxHeight:var_h, autoScroll:true} );

Where var_w and var_h are built/derived from say:

var BUBBLE_SCALE = 0.5; var bubble_w = map.getSize.width * BUBBLE_SCALE; var bubble_h = map.getSize.height * BUBBLE_SCALE;

Or use GM's new maximise button code?

Or at least give the info bubble its own id for css, where htmlCode is the bubble text:

var divStyle = ' '; htmlCode = divStyle + htmlCode + ' '; And css example: div.gmapinfowindow {   width: 400px; font-family: verdana, arial, helvetica, sans-serif; color: #000000;  /* of the text */; font-size: 0.8em; }

--124.191.115.9 00:22, 18 November 2007 (UTC)

Map doesn't load properly in IE
I just upgraded to 0.8 and i realise that the markers and shading on the map don't load immediately in IE, you have to click on Map/Hybrid/Satellite for them to show up, and then if you zoom in/out again the markers disappear. This works in Firefox and Safari just fine and it may have worked fine in IE before the upgrade, i'm not sure.

Anyone else noticed that, and hopefully know how to fix it? 87.194.242.21 00:04, 15 November 2007 (UTC)


 * I am having the same problem with IE 6. I just installed this extension on a new Wiki. It was working fine yesterday and then today it was "broken" except my markers are showing just the map isn't showing. If it is set to Map or Satellite; the markers, controls, the overview, scale, Google/Map data copyright info, and the selectors show. But no streets or satellite pictures. If it is set to Hybrid the streets/neighborhood overlay shows plus the above-mentioned extras but not the satellite pictures. Also the zoom function does work even with no map/sat pics, you see the zoom "guide" appear and the sliding scale moves. If you switch from one type to another, then it all works fine until you reload the page. I checked out the Demo site and it worked fine with my browser so I believe it to be be server side. I tried disabling the cache and purging without success. I also went to the download site, installed 0.7.7 and that version worked fine. I also tried Firefox and it worked fine. --69.47.201.6 10:23, 4 December 2007 (UTC)

Get custom maps from google account
Is there a way to show maps which are available publicly through Google Maps itself. So you can show maps which use the full functionality of Google Maps. 87.194.242.21 13:57, 17 November 2007 (UTC)

I'd also be very interested in an explanation or suggestion of how to do this... but nonetheless Evan thanks for a truly groovy extension! 92.40.13.127

Editor working but no map in article.
I'm using MediaWiki ver 1.11.1 with GoogleMaps ver 0.9.1 and everything looks ok with Editor but pasted tags don't show any Google Map on the page. $wgUseTidy is enabled (I read in Talk that UseTidy can conflict but it's fixed in the latest version of GoogleMaps). Please help. Thanks for this great extension. -- User:208.73.108.66 17:59, 28 February 2008

Update: Version 0.9.1 Firebug displaying - 'unterminated string literal' (Similar in IE) near 'else if' clause Works if $wgUseTidy is Disabled as discussed above(a lot above) --121.247.76.166 14:34, 25 March 2008 (UTC)

Version 0.9.3, Mediawiki 1.11.0 Maps aren't displayed when $wgUseTidy is enabled. --198.169.188.227 08:52, 4 June 2008 (UTC)

php error, as v0.9.1 of the extension seems incompatible to php4
Should I have put this: Extension_talk:Google_Maps here and not up there? -- JanCK 18:52, 28 February 2008 (UTC)
 * Are there plans to make the Google Maps Extension 0.9 compatible with php4? (v7 was working on php4.) -- JanCK 11:00, 6 March 2008 (UTC)
 * YES, sorry for breaking it. Try 0.9.3. --Emiller 00:38, 9 April 2008 (UTC)

url array
version 9.2 edited local settings as shown: $wgEnableParserCache = false; $wgGoogleMapsKey = array("idahothewhitewaterstate.com" => "xxx", "www.kayakidaho.com" => "xxy", "wiki.kayakidaho.com" => "xxz" ); $wgGoogleMapsKey = "xxx"; require_once( "extensions/GoogleMaps/GoogleMaps.php" );

I still get the wrong api error message using any url other than the called from the old version. Grantiago 02:15, 17 March 2008 (UTC)
 * Remove the line

$wgGoogleMapsKey = "xxx";
 * --Emiller 19:38, 2 June 2008 (UTC)

kml import
version 9.2 with the following syntax I get the default lat long as defined in Localsettings.php. nothing from the kml file. http://www.kayakidaho.com/maps/sheep_creek.kml Grantiago 02:14, 17 March 2008 (UTC)
 * To work around this, set the lat/lon in the tag:

<googlemap lat="..." lon="...">
 * --Emiller 19:40, 2 June 2008 (UTC)


 * Picking up the lat long from the kml file needs to be on the feature list for .94 This work around also works for me, but it's painful to have to find the lat long, when that information is already embedded in the the KML that GE produces.

Dkruse 00:21, 4 June 2008 (UTC)
 * The current design separates map properties (lat & lon, zoom level), which are tag attributes, from information about points, which are specified in the tag body. Your suggestion breaks down this division, and it's unclear to me what the map center should be when e.g. two KML files are specified. What would you think of a separate tag that can be used for specifying exactly one KML file? For example,

<googlemapxml height="200" width="300">http://...
 * --Emiller 02:54, 4 June 2008 (UTC)

Maximum Execution Time Error
I have this extension installed on my server, but anytime I try to put a map onto a page, I get this error message:

Fatal error: Maximum execution time of 30 seconds exceeded in /mediawiki/includes/StringUtils.php on line 277

Problem with 0.9.2 and Mediawiki 1.12.0
My other wikis work fine with older versions of Mediawiki and Google Maps, but these versions bring up these messages: Notice: Use of undefined constant GOOGLE_MAPS_PARSE_INCLUDES - assumed 'GOOGLE_MAPS_PARSE_INCLUDES' in /w/extensions/GoogleMaps/GoogleMaps.body.php on line 8 Notice: Use of undefined constant GOOGLE_MAPS_PARSE_ADD_MARKER - assumed 'GOOGLE_MAPS_PARSE_ADD_MARKER' in /w/extensions/GoogleMaps/GoogleMaps.body.php on line 9 Notice: Use of undefined constant GOOGLE_MAPS_PARSE_POINTS - assumed 'GOOGLE_MAPS_PARSE_POINTS' in /w/extensions/GoogleMaps/GoogleMaps.body.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /w/extensions/GoogleMaps/GoogleMaps.body.php:8) in /w/includes/WebResponse.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /w/extensions/GoogleMaps/GoogleMaps.body.php:8) in /w/includes/WebResponse.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /w/extensions/GoogleMaps/GoogleMaps.body.php:8) in /w/includes/WebResponse.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /w/extensions/GoogleMaps/GoogleMaps.body.php:8) in /w/includes/WebResponse.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /w/extensions/GoogleMaps/GoogleMaps.body.php:8) in /w/includes/WebResponse.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /w/extensions/GoogleMaps/GoogleMaps.body.php:8) in /w/includes/WebResponse.php on line 10

The only way I can eliminate the problem is to disable Google Maps by commenting out the lines in localsettings.php. What's causing this? --74.79.172.106 02:37, 25 March 2008 (UTC)


 * Solved this issue on my system editing lines 8-10 in GoogleMaps.body.php as follows. Please note I quoted the constant names:

define('GOOGLE_MAPS_PARSE_INCLUDES', 0); define('GOOGLE_MAPS_PARSE_ADD_MARKER', 1); define('GOOGLE_MAPS_PARSE_POINTS', 2);
 * --Major² 21:49, 30 March 2008 (UTC)


 * FIXED in 0.9.3. --Emiller 00:40, 9 April 2008 (UTC)

Using Dynamic Page List (DPL) to auto-generate maps
Hi Evan,

on http://semeb.com/dpldemo/MapDemo you can find a map which shows "points of interest". The interesting thing is that the POIs on the map come from articles within that wiki; the articles only must use a simple template to state the coordinates and a text (or an image). That´s all. DPL collects those template calls and constructs a call of your googlemaps extension on the fly. It even generates a table with the POIs below the map.

I think this could be of some interest for others as well.

When creating this little application I found two minor problems with your code (regarding the use of uninitialized hasmap elements in php5). Bruno Marcuzzo sent you an email which contains the corrected version. Please check the changes I made and adopt them.

Algorithmix 14:49, 25 March 2008 (UTC)
 * Reading about uninitialized hasmap elements in php5 I just wanted to ask whether code of Google Maps extension really needs the php5 features. Would it be difficult to get a version including the kml-features that works with php4? -- JanCK 03:11, 26 March 2008 (UTC)


 * Thanks for the bug report. I've included what I think is a fix in 0.9.3. --Emiller 00:42, 9 April 2008 (UTC)

doesn't work in protected folder
I've got my Mediawiki Installation in a htaccess protected folder and want to use the Extension but it doesn't work. Problem, I think, is the htacess Protection for the whole wiki. right? Is there any other possibility?

Importing Wikimapia KML

 * I imported Wkimapia KML file from wikimapia.org/ge.kml and saved properly initialized googlemap tag on my Wiki page, after saving the page the map is displayed properly but it doesn't reflect any of Wikimapia place marks. I have to click on the map to display them but the display was not nice, it was cluttered up by several yellow points and they were big enough to hide the places itself. EMiller can you pls try it yourself and better default the view to some Indian city as Wikimapia is quite famous here and each city have numerous place marks. It would be better if you put a small note on my Talk page on your reply. Thanks. Vjdchauhan 15:54, 18 April 2008 (UTC).
 * These yellow points are actually present in the Wikimapia KML code and are intended for Google Earth users to click on them (after such a click, Wikimapia's complete title of the place is displayed in a popup). Fixing the issue you mentioned would most likely require parsing the whole Wikimapia KML output, throwing the defined points out. Such a parsing has to be server-side (because Google Maps API, used by Google Maps Extension, accepts only URLs of KML). —62.231.24.202 11:04, 21 May 2008 (UTC)

Parse error
Hello,

Since I installed GoogleMaps on my Mediawiki (|here it is), I get the following error : Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/29/d178402065/htdocs/totenoc/extensions/GoogleMaps/export/GoogleMapsJsExporter.php on line 242. I uploaded all the files once more but the error remains. Any idea?

Thanks. --Kokoyaya 15:06, 22 April 2008 (UTC)
 * Please find out which mediawiki version and which php version you are using. I get the same error, because I use php4. For getting this version information delete include line for the google maps extension from LocalSettings.php and then go to Special:Version in your wiki to look for the versions. If you can miss out on the cool kml-features of the new version (which makes your data much better available for other mashups and google local search, etc.), you might be able to use an earlier version of the extension. I'm using 0.7.7 right now and it is working - though without and kml-support. -- JanCK 16:22, 22 April 2008 (UTC)
 * Hm, maybe that's not the problem. I've just been to http://totenoc.org/wiki/Especial:Version and it said:
 * Produch 	Version
 * MediaWiki 	1.12.0rc1
 * PHP 	5.2.5 (cgi)
 * MySQL 	4.0.27-standard-log
 * Dunno, what the problem is. Maybe you can solve this error by trying to delted the keyword "static" from that line. That helped me (though I couldn't make it work in the end: Even after deleting all keywords "static" and replaced all "self::" by "this->" I still couldn't make the SpecialGoogleMaps class to get loaded. But maybe you could see whether making the changes I made brings you as far as I got. Maybe we have a common problem that is not the php version. Dunno. -- JanCK 16:27, 22 April 2008 (UTC)
 * Are you having two wikis on this server? One at http://totenoc.org/wiki/ and one at http://totenoc.org/index.php (plus some redirect). -- JanCK 16:31, 22 April 2008 (UTC)
 * I have only one wiki but I used a short URL modification: http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_No_Root_Access%2C_1.13_alternative --Kokoyaya 16:42, 22 April 2008 (UTC)
 * (Before reading your post I wanted to add:) I guess now there is just one wiki. When I go to http://totenoc.org/index.php5, I get redirected to http://totenoc.org/wiki/Acu%C3%A8lh and everything seems to work fine. So I guess you redirect /wiki/* to index.php5?*. But there is also http://totenoc.org/index.php and this yields the error. So I suppose your .php5 files are parses with php5 and .php files are parsed with php4. Try going to http://totenoc.org/index.php?Especial:Version or something like that. -- JanCK 16:45, 22 April 2008 (UTC) PS: I mean: Try going there after commenting out the google maps extension in LocalSettings.php. ... just to find out which version of the php processes .php files. -- JanCK 16:49, 22 April 2008 (UTC)
 * I may have deleted the php5 parameter. I try that and I tell you about it... --Kokoyaya 18:47, 22 April 2008 (UTC)
 * I added $wgScriptExtension = '.php5'; and it works. The "/wiki short URL" is skipped when I edit some pages but at least, no more error page. Thanks a lot. --Kokoyaya 19:03, 22 April 2008 (UTC)

Markers/Paths not appearing
mediawiki 1.12.0 and google maps extension 0.9.3

Installed the extension and seems to generally work fine. When using the editor, I can add markers and draw paths, and it gives me the markup to use. When I copy this markup into the desired page, Google Maps only loads the map and appropriate settings (e.g. the information inside the googlemap tag) but does not display any markers or paths. Any ideas what could cause this? Thanks -- 216.80.81.193 19:51, 22 April 2008
 * Could you provide a link? Does it display a google map or just a picture. Maybe you have turned off javascript? -- JanCK 23:14, 22 April 2008 (UTC)

Not all tags show on the map
http://totenoc.org/wiki/Esc%C3%B2la : it shows the map that can be seen at this address. The problem is that the tags are on two pages and that I can only see those from the first page. Any idea on how to show all? --Kokoyaya 22:12, 22 April 2008 (UTC)
 * Could you explain this a little further? What do you mean by "tags on two pages"? And I'm not sure about the syntax here: Why are you using
 * http://maps.google.com/maps/ms?ie=UTF8&hl=fr&msa=0&msid=117602036879672436237.00044a8708e76338efb89&ll=43.938451,1.306686&spn=0.230904,0.711365&z=11
 * as one of your inputfiles. I'd guess this lag the "&output=kml" option in order to get a kml file. Though I have to say the kml file you get then is not really what you'd maybe hope for. When I tested this all it gave me was a kml file with a link to the content. I had hoped to get a list of all points, but that seems more difficult. So this GoogleMapsExtension won't be able to parse the output, but maybe that isn't neccessary. Right now I'd assume that the extension just hands over the kml file to google maps for it to be evaluated there. Anyways, maybe I'm just not familiar with the syntax of this extension and links to google maps are allowed as input though the stuff you get back from the URL ist not kml but html with a map on it. Dunno. -- JanCK 23:02, 22 April 2008 (UTC)
 * Tags on two pages = in the left column, tags show on two pages (see at the bottom) and the tags shown on the map are only the tags shown in the left columns (the second page can be seen at this page. I used http://maps.google.com/maps/ms?ie=UTF8&hl=fr&msa=0&msid=117602036879672436237.00044a8708e76338efb89&ll=43.938451,1.306686&spn=0.230904,0.711365&z=11 as input because I thought I had to; I tried without and it does not change anything. --Kokoyaya 07:23, 23 April 2008 (UTC)
 * So you are telling me that using
 * http://maps.google.com/maps/ms?ie=UTF8&hl=fr&msa=0&msid=117602036879672436237.00044a8708e76338efb89&ll=43.938451,1.306686&spn=0.230904,0.711365&z=11
 * as kml input gives you any results? I'm surprised about that. Are you sure? What do you mean by I tried without it? Have you tried without the additional kml-file? I suspect that non of your markers from the html-file are included in your wiki-map, and I would assume that you'd have to put the following URL as input, in order for it to work:
 * http://maps.google.com/maps/ms?ie=UTF8&hl=fr&msa=0&msid=117602036879672436237.00044a8708e76338efb89&ll=43.938451,1.306686&spn=0.230904,0.711365&z=11&output=kml
 * -- JanCK 09:13, 23 April 2008 (UTC)
 * With only that address, I have http://totenoc.org/wiki/Esc%C3%B2la (that is to say no tag).
 * <googlemap version="0.9" lat="44.150681" lon="1.380157" zoom="7" type="map" controls="large" scrollwheel="zoom">http://maps.google.com/maps/ms?ie=UTF8&hl=fr&msa=0&msid=117602036879672436237.00044a8708e76338efb89&ll=43.938451,1.306686&spn=0.230904,0.711365&z=11&output=kml
 * --Kokoyaya 09:38, 23 April 2008 (UTC)
 * Hm, I'm sry, then I don't know. Maybe this is a bug. The following URL works for me:
 * http://maps.google.com/maps?f=q&hl=de&q=http%3A//maps.google.com/maps/ms%3Fie%3DUTF8%26hl%3Dfr%26msa%3D0%26msid%3D117602036879672436237.00044a8708e76338efb89%26ll%3D43.938451%2C1.306686%26spn%3D0.230904%2C0.711365%26z%3D11%26output%3Dkml
 * So the link you tried works, when you tell google maps at maps.google.com to display it. I'm not sure why the google maps mediawiki extension doesn't display it. Maybe there is a parsing error for the complicated url? Or the kml file is too complicated. I'm not sure whether the extension looks into the kml file or whether he'll just hand it over to google. .... Hm, I just had a look at the kml file. It isn't as complicated as I thought. I get a file called "Escòlas e occitan.kml", when clicking the link. And it is of a very simple form. So I think it is more likely that a parsing error of the url causes the problem. Maybe you could try saving the above mentioned kml file to another location somewhere on your server. Then you can try including that. This could tell you whether the kml file is the problem or whether the url is. Surely, you'll lag the ability to update the file via the google maps interface during the test. So you might not want that for a final solution, but just for testing purposes ... -- JanCK 09:53, 23 April 2008 (UTC)
 * I just wrote the following posting. You'll have to look at it in the editing mode as it describes the difference between "&" and "& a m p ;". However I didn't manage to stop the wiki from transforming the "& a m p ;" into an "&". So even the link that I speak about, which yields the error by google maps when copy and pasted from the "edit"-page of this page, is displayed here in a way that it works. However, this parsing by the wiki (I'm just guessing the wiki is doing it, as the links were changed too and I guess firefox wouldn't change links but just change the displayed strings.) won't apply to the below mentions javascript line, so the error keeps happening there. -- JanCK 10:31, 23 April 2008 (UTC)
 * I don't understand this completely but for now I'd assume that it is a parsing error as I see that you put this url
 * http://maps.google.com/maps/ms?ie=UTF8&hl=fr&msa=0&msid=117602036879672436237.00044a8708e76338efb89&ll=43.938451,1.306686&spn=0.230904,0.711365&z=11&output=kml
 * into the googlemaps-tags. However the sourcecode says: (the line below isn't displayed as wanted. see above comment)
 * http://maps.google.com/maps/ms?ie=UTF8&amp;hl=fr&amp;msa=0&amp;msid=117602036879672436237.00044a8708e76338efb89&amp;ll=43.938451,1.306686&amp;spn=0.230904,0.711365&amp;z=11&amp;output=kml
 * in the line (the line below isn't displayed as wanted. see above comment)
 * geoxml = new GGeoXml("http://maps.google.com/maps/ms?ie=UTF8&amp;hl=fr&amp;msa=0&amp;msid=117602036879672436237.00044a8708e76338efb89&amp;ll=43.938451,1.306686&amp;spn=0.230904,0.711365&amp;z=11&amp;output=kml");
 * and the yields {errorText:"Es konnte keine Verbindung zum Server hergestellt werden."} as output for me. So the difference is that "&" gets parsed into "&amp;" (<- = "& a m p ;" see above comment) and I guess it would work if that wouldn't happen. But maybe that's a security thing. Dunno. I guess the next step would be to look at the code that is parsing the URLs and thing about whether it's a security risk to not change & into &amp;. But I guess you could just risk changing that for your wiki in the source code and hope that noone will take the time to exploit it. -- JanCK 10:22, 23 April 2008 (UTC)
 * I cannot get a Google maps (on maps.google.com) with more than 200 tags. The problem may come from that. I may have to make several maps with less than 200 tags and show them at once. --Kokoyaya 10:44, 23 April 2008 (UTC)
 * I'll be surprised, if that's the problem. But please try and tell us. However the parsing from & to & a m p ; seems to me to be the problem. Have you tried downloading the google-maps-kml-file and counted the lines in order to find out whether it lacks some entries? -- JanCK 11:05, 23 April 2008 (UTC)

"Tab" problems with 0.9.3
We had GoogleMaps 0.7.7 working very nicely with our installation of MW 1.9.3, but switching over to GoogleMaps 0.9.3 has revealed some problems with tabs, both with "Version 0" syntax and "Version 0.9" syntax. Both problems can be seen on this page: http://isaacnewton.princeton.edu/9/index.php?title=Test/googlemap

Here is a description of the problems:

Version 0 Syntax
The first tab is fine, but the second tab opens up as a completely blank balloon.

Here is the googlemap text. It uses Template:wp defined as: wp

<googlemap lat="40.348654" lon="-74.659256" zoom=15 width=700 height=300 > (b1) 40.348654, -74.659256 /Township\ Princeton http://www.princetontwp.org/merceroak-80.jpg /University\ http://engineering.princeton.edu/data/images/footer_shield.jpg Princeton University

Version 0.9 Syntax
In this case, only one tab is generated.

Here again is the googlemap text: <googlemap lat="40.348654" lon="-74.659256" zoom=15 width=700 height=300 version="0.9"> 40.348654, -74.659256, Title /Township\ Princeton http://www.princetontwp.org/merceroak-80.jpg /University\ http://engineering.princeton.edu/data/images/footer_shield.jpg Princeton University

Thanks! Peak 21:08, 19 May 2008 (UTC)


 * I believe the problem is that you have trailing spaces after the /\. I will change future versions to be more flexible. --Emiller 20:03, 2 June 2008 (UTC)

GeoCoding support
Now that the google maps API supports GeoCoding I'd love to be able to use real addresses instead of lat/lon


 * perhaps a format like 'adr: 101 Main Street, Cary, NC'

Geocoding Support
I second the motion on this. --63.251.157.172 17:23, 9 June 2008 (UTC)

KML Import stopped working?
I might be missing something obvious here but I had KML imports working correctly on the following page:

http://www.melpedia.com.au/wiki/Restaurants

pulling in the following URL:

http://www.melpedia.com.au/wiki/Special:KMLExport/Restaurants

However this appears to have just stopped working. I can't figure out what might be cusing this. If you view source the page it appears to be writing out all the correct javascript to get this working. Any ideas? I have tested the KML files in Google Earth and they are reading fine. Rodeoclash 01:35, 18 June 2008 (UTC)

Further edit: You can see the KML file being loading into the standard google maps fine.

Fix
It appears that Google have changed the API. A temp fix is to change line 684 of the file GoogleMaps.body.php to 			'api'         => '2.x', I'll leave it up to Evan to implement the correct fix but if you're using the KML import function, this will get you up and running again.

Rodeoclash 02:42, 18 June 2008 (UTC)

Monobook changes
I was getting nothing until I commented out the on_load function in monobook.php


 * <?php if($this->data['body_onload'   ]) { ?> onload="<?php     $this->text('body_onload')     ?>"<?php } ?>

Special:Specialpages doesn't load
As I had problems with php4 and my host installed php5 now as standard I tried v.9.3 of the Google Maps Extension just now. I use: MediaWiki: 1.6.7 php 5.1.6-1 (cgi-fcgi)

Loading pages with maps and without seems fine. The editor works. I can go to pages like Special:Version. But I get an error, when going to Special:Specialpages.
 * Fatal error: Call to a member function isListed on a non-object in /home/www/web780/html/w/includes/SpecialPage.php on line 210.

As listed in an earlier comment line 210 in that file is:
 * if ( $page->isListed ) {

within the function:
 * function getPages {
 * global $wgSpecialPages;
 * $pages = array(
 * => array,
 * 'sysop' => array,
 * 'developer' => array
 * foreach ( $wgSpecialPages as $name => $page ) {
 * if ( $page->isListed ) {
 * $pages[$page->getRestriction][$page->getName] =& $wgSpecialPages[$name];
 * }
 * }
 * return $pages;
 * }
 * }

Calling the URL http://domain/wiki/Spezial:GoogleMapsKML I get
 * Fatal error: Call to a member function including on a non-object in /home/www/web780/html/w/includes/SpecialPage.php on line 272

So there is a hook to this page, because I get a normal non-existence message for non-existing sites. Anyone else experienced that? -- JanCK 13:35, 30 June 2008 (UTC)

Double issue: Google key confusion, Firefox browser confusion (RESOLVED)
Just installed the latest GoogleMaps (0.9.3?), using MW 1.13. The edit box displays the Editor's Map icon, but when I click on it, two bad things happen: 1) a dialog box drops down and tells me "The Google Maps API key used on this web site was registered for a different web site. You can generate a new key for this web site at http://code.google.com/apis/maps/". I don't have any idea how this could happen; who are the two parties that have this conflicting information, and how can I fix this? i should mention that my key works elsewhere in my directory.

2) just below the edit icon bar the following text magically appears: "Unfortunately, your browser does not support the interactive map-making features. Try the latest version of Internet Explorer (Windows) or Firefox (Windows, Mac, and Linux)." Unfortunately, I am indeed using the latest version of Firefox (3.0.1) on the Mac. I've seen that this version of Firefox has some issues with GBrowserIsCompatible; could that be the source of this problem?

Any advice would be greatly appreciated--Alan H 19:22, 29 August 2008 (UTC)
 * Followup: I get the same "Unfortunately..." error message on a different computer using Firefox 2.0.0.16 (also, the same API message, but that's to be expected).--Alan H 11:57, 30 August 2008 (UTC)
 * Sigh...Both problems went away when I finally realized that the code that says something like "your API key goes here" was not actually code, it was an instruction! --Alan H 14:22, 15 October 2008 (UTC)
 * Followup2: Got the first problem, serving 2 pages with GM included. While surfing as registered user none of the pages work. If I am not logged in, one of the pages works. Disabling referrers solves this problem, but is not practicable for our users. Any suggestions? -- Frederik 17:16, 25 September 2008 (UTC)

Link in the title is always in red (default edit mode)
Hi, I'm trying to use the title in the window when I clic on the marker. My problem is that it is always in red. The weird thing is it's really finding the page, but when I clic on it, I'm in edit mode. Do you know where to look to remove this "action=edit" in the title's URL? Or where to check when it's searching if the page exist or not, and add this action=edit after the url? In fact I cannot reproduce this on my local webserver on my computer, it's only not working on my production server (http://www.awaycity.com/wiki/Dublin/Swimming). If you can explain me how to test/debug or where to look, I would be very very grateful. Thanks in advance! Charles. PS:I'm using the 0.9.3, so could be great if you know the file, line where to look and after I will try and check what's going on. RESOLVED: I checked on the source of the page and the link of the page had something wrong like some additional parameter: <a href=\"/wiki/index.php?title=Quality_Hotel&amp;action=edit\"&awaycity_test_mw__session=05088ae126635ef414e1867c1446b389... etc After deleting my local cache, everything was allright. I think there is perhaps sth wrong with my vBulletin auth link. by the way thank you for the extension: it's amazing :-)

Problems using Google Maps with a template
I'm trying to use the extension in a template, passing the latitude and longitude as variables to the extension. The code I'm using in the template is:

The page generated by the template displays the map, and appears to be substituting the latitude and longitude correctly:

But the map isn't centering on these coordinates - it's somewhere up in Wyoming (while these coordinates are in Colorado). Regardless of the coordinates that it substitutes, the map generated has the wrong center point (usually in Wyoming). The other parameters (zoom, width, etc.) seem to be working fine.

Can somebody help this newbie out?

--~ --04:39, 7 August 2008 (UTC)~ Ron

Additional info: I also tried using the syntax lat as described above, with no success (assuming I was implementing it correctly). Can anyone confirm whether this extension will actually work in a template? No need wasting more time if it won't.

--~

Cheers
Just wanted to laud you for a great extension! THANKS! -- töff 22:14, 11 September 2008 (UTC)

Template syntax
First off, great extension - it's working wonderfully for the most part.

Quick question, maybe it's just my unfamiliarity with MediaWiki, but...

I'm using this in a template, it looks like:

This centers the map based on the latitude and longitude inputs.

The question: With the normal syntax, the coordinates and descriptions between the tags become points on the map with labels. How do you recreate this with the template syntax?

Thanks in advance.

--209.160.36.40 19:49, 25 September 2008 (UTC)

KML only visible in Editor's Map
I'm trying to import a KML file of markers for a map in my wiki, and when I'm in the editor's map, everything shows up fine, but once I try to preview or save, the map is blank. See here. What could explain this? Joezoo 21:59, 2 October 2008 (UTC)

Using GoogleMaps within a template
See that others have problems to get GoogleMaps working within a template: As Newbie it costs me two day of my life to get it, but this worked for me in tables as well as outside of tables in MediaWiki:

47.988055, 10.187716, Memmingen Memmingen Memmingen, Bayern <googlemap version="0.9"  zoom="10"  width="400"  height="450"  type="terrain"  selector="yes"  lat="47.988055"  lon="10.187716"> 47.988055, 10.187716, Memmingen Memmingen Memmingen, Bayern

"Prosit" or "it may be usefull.

-- Martin --

Validation Error
When using http://validator.w3.org/ to check my wiki page I get two errors. I have tested other people's sites from the example list and they have it too. I am using v1.13.2 with extension v0.9.3. The error is: required attribute "alt" not specified Quotes 17:33, 9 December 2008 (UTC)

Invalid markup in hardcoded CSS if width specified as percentage
If I specify the width as (say) "100%" instead of (say) "600" the output of the style information in the html is written as "100%px". The image size definition is okay. Example: <img height="250" width="100%" src="http://maps.google.com/staticmap?center=

Quotes 17:40, 9 December 2008 (UTC)