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.''

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

Marker info from an external file
Any ideas on how to include the marker information (location, etc.) in an external file. I want to generate status information from several locations on the fly and then change their icons to reflect the status. Suggestions? Jspahn 26 July 2007
 * As of 0.9.0, you can now include KML, which may give you what you're looking for. --Emiller 08:40, 21 February 2008 (UTC)

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)

Creating Points
I was looking around the site here and couldn't find a way to make a point on the map without going into the "edit page". I'm looking for a way for someone to just goto the displayed map, click on a location, and make a point there. Is there any way this is possible? Stygarfield 15:30, 2 June 2007 (UTC)
 * Nope! --Emiller 08:33, 21 February 2008 (UTC)

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)

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)

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)

Use mouse's wheel
It would be useful if when the mouse is over the map, the wheel was use to zoom in and out. Can we do that? --Jfbeaumont 17:06, 2 March 2007 (UTC)
 * I bet that's possible: http://adomas.org/javascript-mouse-wheel/. --Emiller 19:14, 3 March 2007 (UTC)
 * Check out Version 0.8. --Emiller 10:00, 6 August 2007 (UTC)
 * How can I disable mouse wheel zoom in version 0.8? Most of the time I'm just trying to scroll down the page and instead the map starts zooming. --Ryancyoder 18:33, 27 August 2007 (UTC)
 * Mouse wheel zoom is disabled by default in 0.9.0. Enable it with scrollwheel="zoom". --Emiller 08:38, 21 February 2008 (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)

How do I change the pixel size of the paths?
I would like them to be quite a bit thinner, not so wide and transparent. --192.203.201.3 18:53, 6 February 2007 (UTC)


 * Right now the only way to do this is to modify the "initialize" function of EditorsPath in EditorsMap.js. Change "6" to a more acceptable value. --Emiller 03:20, 27 February 2007 (UTC)


 * Version 0.9.0 lets you customize the appearance of paths. --Emiller 22:49, 26 February 2008 (UTC)

where to change size and shadow size of custom markers?
Wow. Thanks for this really great extension. Easy to install, easy to use. Impressing results.

I have a question dealing with custom markers: when I use my own markers they will always zoom in (or zoom out) to the default marker size and shadow size. In my special case I like to use really small icons for the marker, just a few pixels, without shadow. Where do I change this for the marker icons in the script? --Wikisteph 10:37, 7 December 2006 (UTC)
 * Search for "new GIcon" in GoogleMaps.php and refer to http://www.google.com/apis/maps/documentation/reference.html#GIcon --Emiller 06:50, 18 January 2007 (UTC)

Hi, could someone make this a little bit more detailed for me? So I have to change the section from line 426 in GoogleMaps.php ? //<![CDATA[ var GME_SMALL_ICON; GME_SMALL_ICON = new GIcon; GME_SMALL_ICON.image = "http://labs.google.com/ridefinder/images/mm_20_yellow.png"; GME_SMALL_ICON.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; GME_SMALL_ICON.iconSize = new GSize(12, 20); GME_SMALL_ICON.shadowSize = new GSize(22, 20); GME_SMALL_ICON.iconAnchor = new GPoint(6, 20); GME_SMALL_ICON.infoWindowAnchor = new GPoint(5, 1); and uncomment the line with CDATA ? nothing changes for me if I change GSize, GPoint... Thank you --77.128.56.3 21:03, 28 January 2007 (UTC)


 * Actually, you need to change this line:

$output .= " GME_DEFAULT_ICON = new GIcon(G_DEFAULT_ICON, '".addslashes($o['icon'])."');";
 * Right after it, put something like

$output .= " GME_DEFAULT_ICON.iconAnchor = new GPoint(12, 10);";
 * --Emiller 03:20, 27 February 2007 (UTC)

Thank you for your answer! It worked for marker.png and firefox but not for IE. No more markers with IE. I had to change: function googleMaps_GetDefaults  and change the default "icon" =>  to s.th. i want to use. I didn't had to change anything in $output .= " GME_DEFAULT_ICON = new GIcon(G_DEFAULT_ICON, '".addslashes($o['icon'])."');"; Together it looks like this: if ($o['icon'] != 'http://www.google.com/mapfiles/marker.png') { $output .= " GME_DEFAULT_ICON = new GIcon(G_DEFAULT_ICON, '".addslashes($o['icon'])."');"; $output .= " GME_DEFAULT_ICON.iconSize = new GPoint(12, 10);"; $output .= " GME_DEFAULT_ICON.shadowSize = new GSize(22, 20);"; $output .= " GME_DEFAULT_ICON.iconAnchor = new GPoint(12, 10);"; } Is it possible to add even marker{label}.png. I tried with : if ($o['icons'] !=..........., but failed. Thank you

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)


 * 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)

Ok for Non Technical Users?
I'd like to use this on my site, but it looks technically beyond me. I barely get html, and know next to nothing about java or php. Is this something I can do, or should i get someone to help? And if I need to get help, how would I find someone qualified? Thank you for your assistance. --Natcolley 14:21, 26 May 2006 (UTC)


 * Hi Nat, if you can understand the installation instructions, you won't feel overwhelmed, I promise. --Emiller 02:43, 22 October 2006 (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)

Search by Zip Code
Is there anyway to implement zip codes into these maps? I really want for articles on my site to have maps with markers on them, and then have people be able to search for things close to them by zipcode. is that possible? 75.111.46.8 22:12, 3 March 2007 (UTC)
 * Yes. Just type a ZIP code into the search box on the Editor's Map. --Emiller 08:43, 21 February 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)

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?

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

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)

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)

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)

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)

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)

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

Using Pictures in the Balloons
Does anyone use pictures or any other type of files in the balloons? Or does anyone know if we can do that with this extension? thanks, --198.70.22.217 14:06, 18 April 2007 (UTC)

Photo-op-wiki uses pictures in balloons. It works best if you insert a thumbnail in the balloon... just use the standard thumbnail image syntax with it aligned to the left. --Graydon 04:15, 22 April 2007 (UTC)

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)

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)

kml / georss import
I have tried to add kml / georss import. It looks like it is working. Is this a right way or am I forgetting something? --- GoogleMaps.body.php.org	2007-08-06 10:56:07.000000000 +0200 +++ GoogleMaps.body.php	2008-02-18 11:05:04.000000000 +0100 @@ -417,6 +417,12 @@    if( $o['icon'] != 'http://www.google.com/mapfiles/marker.png' ) { $output .= " GME_DEFAULT_ICON = new GIcon(G_DEFAULT_ICON, '".addslashes($o['icon'])."');"; } +   if( $o['rss1'] != '' ) { +       $output .= " geoXml1 = new GGeoXml( '".$o['rss1']."'); map.addOverlay(geoXml1);"; +   } +    if( $o['rss2'] != '' ) { +       $output .= " geoXml2 = new GGeoXml( '".$o['rss2']."'); map.addOverlay(geoXml2);"; +   }     // parse the content of the tag $lines       = preg_split( "/[\r\n]+/", $pContent ); @@ -730,6 +736,8 @@      'lon'         => -73.205112, 'overview'   => 'no', 'precision'  => 6, +     'rss1'	     => '', +     'rss2'	     => '', 'scale'      => 'no', 'selector'   => 'yes', 'stroke'     => 6, --62.45.179.83 11:16, 19 February 2008 (UTC)


 * KML import has been added to 0.9.0. --Emiller 22:27, 26 February 2008 (UTC)

New Google API Terrain update?
HI,

Thanks for a great extension!

Are there any plans to update this extension to support the new 'terrain' option that is in the latest API?

Google haven't enabled it by default, but it can been easily enabled it seems. See http://googlemapsapi.blogspot.com/2007/12/v294-terrain-and-new-maptypecontrol-to.html

It's probably really simple to do, and I'll have a look at the code myself tomorrow to see if I can figure it out.

Ideally, I'd like to keep the hybrid button as well, but just add the terrain button...

Thanks


 * You got it. Check out version 0.9. --Emiller 22:27, 26 February 2008 (UTC)

Polygons ??
This extension should take advantage of the polygons that you can use with gmaps. I know this is done with another extension, but this one should have that capabilty being it is the most used. --198.70.22.217 15:04, 30 May 2007 (UTC)
 * Check out Version 0.8. --Emiller 09:55, 6 August 2007 (UTC)

Wishes in next version by user

 * I really hope I can load kml files someday..
 * I found There is a way to load xml files, but it's too hard to edit code to load kml files.
 * Today's the day! Check out version 0.9.0. --Emiller 22:30, 26 February 2008 (UTC)

KML

 * I would really like to be able to load kml files, as they can contain so much more information just ready to go. It look likes the more recent GM API will also allow kml network links as well - so maps can be dynamic. I just want to specify a URL that links to the file and that file be loaded using code like so:

// get the kml File var kmlFile = new GGeoXml("http://www.xyz/kml/my.kml", function {       if (kmlFile.loadedCorrectly)        {            // cancel the "Loading" message            document.getElementById("loadingMsg").innerHTML = '';        }      }); map.addOverlay(kmlFile);

Better still; do it as an array of files, so mashups of multiple kml files can be shown. The loading message could be left out - otherwise the message would have to sit on the map somewhere. In the past I have used an animated gif that rotated around as the "loading msg".

Background info for readers: kml files can be made using Google Earth or Google Maps My maps. Also lots of GPS software can produce them.
 * KML import/export will be in 0.9.0. --Emiller 08:32, 21 February 2008 (UTC)

ERROR Cannot modify header informationSince installed the extension I get this when saving
Since installed the extension I get this when saving or even starting the page:

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/********/wiki/LocalSettings.php:1) in /www/htdocs/********/wiki/includes/WebResponse.php on line 10

What happend - can you help me please - apart the ERROR (which is shown over my whole site) the extension works well


 * I was getting similar errors, along with specific warnings in GoogleMaps.body.php and SpecialGoogleMapsKML.php. I asked on the  installation article's discussion page and got this reply:


 * 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).


 * This worked great for me, removing all the PHP warnings. I don't actually know enough about PHP to know what the "&" characters were for, but it appears to work properly without them. Jangell 08:33, 23 February 2008 (UTC)
 * Fixed in 0.9.1. --71.202.99.103 23:10, 27 February 2008 (UTC)

Distance
Great extension ! Thank you for the hard work. Sure, there is a lot of new functions to be added but first I have some problem with distance : Here is a simple exemple (the whole erratic behaviour is more complicated).

A path of four points (three vectors of visualy same lenth) and two right angle. The distance calculated for each the two first vectors is twice as long as the third. Apparently the third one is the correct one. Is this a bug of google function ?


 * Will be fixed in 0.9.0. --Emiller 08:27, 21 February 2008 (UTC)

Markers don't work properly unless preceded by a space
Syntax says: "The line should then have the latitude, then a comma, optionally a space, then the longitude, then a comma, then a label for the point." If you put the marker text immediately after the longitude without a space (as in CSV export), then the marker shows up on the map but it isn't clickable.

Example:  shows the marker, but   puts a clickable marker on the map. EHartwell 00:07, 9 May 2007 (UTC)


 * Nice catch, I'll fix this. --Emiller 02:00, 29 July 2007 (UTC)
 * Fixed in 0.8.0. --Emiller 10:01, 6 August 2007 (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)

Local.Settings.php Error
When I reload my site, I keep getting this error:

Parse error: syntax error, unexpected T_STRING in /afs/athena.mit.edu/user/a/f/afong05/web_scripts/Connect/LocalSettings.php on line 405

I'm not sure what this means. Thank you!


 * You have a syntax error in your LocalSettings.php file. Double check it around line 405, and if you don't see the problem, post it here and maybe someone can help you out. --Emiller 01:47, 5 February 2007 (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)

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.

"helper" like gmap
The gmap extension has a "helper" attribute so it is easy to locate lat/lon coords. With this extension, how can I scroll around the map and find the lat/lon coords I'm interested in? Do I have to use a completely different app to find the coords and then paste them in here? 128.23.114.39 19:24, 7 September 2007 (UTC)


 * Click the map icon on top of the edit box to use the editor's map. Kainaw 16:12, 11 September 2007 (UTC)

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)

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

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.

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)

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)

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)

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)

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)

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)

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)

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?