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

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

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)

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)

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)

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)

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.

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)

remove 'make a map' link from edit page
Is it possible to remove the 'make a map' link from all edit pages. It seems to slow down loading of the edit page. I would just like to use the markup on whatever page I want the maps on. And maybe a link to the make a map page, which will help me get that markup, although this is not necessary. --Pdesai 19:45, 19 December 2006 (UTC)
 * You got it. Install version 0.7.5, and then add "$wgGoogleMapsDisableEditorsMap = true;" to your LocalSettings.php. --Emiller 06:18, 8 January 2007 (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

Embedding a Googlemap in a table
Can this be done? I've tried pasting the googlemap-generated code inside a wiki table cell and the code shows up instead of the map. I haven't tried putting it in an HTML table cell, but I expect the result would be the same.
 * Nevermind. It works in an HTML table.
 * It works in a wiki table created with {| and |}, too. Thinkling 22:31, 21 March 2007 (UTC)

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)

Is it possible for marker not to be clickable?
When I click on the marker on the map on this page the map scrolls to show the contents of the bubble, but I don't want this to happen, and don't require the marker to have a bubble on this map. So is it possible to prevent some markers from being clickable? Hensa 15:41, 10 May 2007 (UTC)

Oh - I've just figured it out: you just save the marker without adding text to the bubble. Silly me. Hensa 15:43, 10 May 2007 (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)

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.

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?

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)

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

0.7.5 Translation to French
I modified GoogleMapsMessages.php to add translation to French which I grabbed from Extension:Google Maps/Languages/FR.

"fr" => array(       'incompatible browser' => 'Pour voir la carte qui devrait être dans cette espace, utilisez un navigateur compatible.',        'no editor' => 'Malheureusement, votre navigateur ne supporte pas la création interactive de carte. Essayez d\'installer la dernière version de Firefox (Windows, Mac, and Linux) ou au pire Internet Explorer (Windows)',        'make marker' => 'Légende (wiki annotation OK):',        'remove' => 'Enlever',        'caption' => 'Légende',        'tab title' => 'Titre de l\'onglet',        'tab' => 'Onglet',        'start path' => 'Démarrer le trajet',        'save point' => 'Enregistrer & fermer',        'load map from article' => 'Charger une carte de l\'article:',        'no maps' => 'Pas de carte dans cet article à charger.', 'refresh list' => 'Mettre à jour la liste', 'load map' => 'Charger la carte', 'clip result' => 'Ajouter à la carte', 'no results' => 'Désolé, pas de résultats', 'searching' => 'Recherche...', 'map' => 'Carte', 'note' => 'Note: assurez vous d\'avoir bien copié ce que vous voulez enregistrer dans l\'article avant de cliquer sur "Charger la carte", "Enregistrer" ou "Preview"!', 'instructions' => 'Si dessous, l\'annotation wiki pour créer la carte obtenue au dessus.', 'are you sure' => 'Etes-vous sur ?', 'clear all points' => 'Enlever tous les points', 'refresh points' => 'Mettre à jour les points', 'width' => 'Largeur', 'height' => 'Hauteur', 'scale control' => 'Echelle', 'overview control' => 'Vue d\'ensemble', 'selector control' => 'Selection Carte/Satelite', 'zoom control' => 'Navigation', 'large' => 'Grande', 'medium' => 'Moyenne', 'small' => 'Petite', 'no zoom control' => 'Non', 'yes' => 'Oui', 'no' => 'Non', 'search preface' => 'Cliquez sur la carte pour ajouter un point ou se déplacer vers une ville, pays, adresse:', 'search' => 'Rechercher', 'clear search' => 'Nettoyer les résultats des recherches', 'meters' => 'mètres', 'miles' => 'miles', 'editing path' => 'Cliquez sur la carte pour ajouter d\'autres points à ce trajet.', 'save path' => 'Sauvegarder', 'edit path' => 'Ajouter des points', 'color path' => 'Changer de couleur', 'make map' => 'Créer une carte', 'hide map' => 'Cacher la carte', ),

But I get the following error messages:

Notice: Undefined index: width in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: height in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: zoom in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: units in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: scale in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: selector in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: icons in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: icon in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: version in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: precision in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: color in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: overview in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: geocoder in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170 Notice: Undefined index: localsearch in C:\Program Files\EasyPHP 2.0b1\www\wiki\extensions\GoogleMaps\GoogleMaps.php on line 170

What can I do to fix it?

Antoine Sirianni 15:00, 17 February 2007 (UTC)

Well, I disabled notifications in php.ini file. I introduced a call to utf8_encode to manage accents.

'make map' => 'Créer une carte',

becomes

'make map' => utf8_encode('Créer une carte'),

In the case where there is some HTML text in the comments, I do not know if this modification fits. That is why I did not modify the whole array. It should also be valid for other languages.

--Antoine Sirianni 15:11, 24 February 2007 (UTC)


 * I think your text editor is speaking ISO-8859-1, which makes the call to utf8_encode necessary. Version 0.7.6 ships with the French translation in UTF-8, so you should just use that instead. --Emiller 04:15, 27 February 2007 (UTC)

I did it but still get pbs with translation. In defaultsettings, it says it speaks UTF-8:

/** We speak UTF-8 all the time now, unless some oddities happen */ $wgInputEncoding = 'UTF-8'; $wgOutputEncoding = 'UTF-8'; $wgEditEncoding  = '';

In localsettings, it says it speaks french:

$wgLanguageCode = "fr";

No ref to ISO-8859-1.

I get the same bug which I corrected with the same patch: utf8_encode('Créer ...

--Antoine Sirianni 17:56, 1 March 2007 (UTC)


 * The issue isn't your defaultsettings. Your text editor is encoding the file in ISO-8859-1 before saving it... try a different editor? --Emiller 01:11, 29 July 2007 (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)

A problem: Code being output without replacement of substitution stuff
Editor's Map comes up, but displaying the page gives stuff like: %%BEGINJAVASCRIPTd4520279...e3daed4%% function createMarker(point, label) { var marker = new GMarker(point); GEvent.addListener(marker, 'click', function { marker.openInfoWindowHtml(label); }); return marker; } function addLoadEvent(func) { var oldonload = window.onload; if (typeof oldonload == 'function') { window.onload = function { oldonload; func; }; } else { window.onload = func; } } window.unload = GUnload;%%ENDJAVASCRIPTd452...aed4%% (I subbed ellipses inside the part that is my key). Any thoughts? --- Sarah


 * Hi Sarah, what version of MediaWiki are you using? --Emiller 06:46, 19 September 2006 (UTC)

bad_behavior_extension installed? See

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)

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)

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)

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)

Notice: Undefined offset: 4 in ./extensions/GoogleMaps/GoogleMaps.php on line 343
When I make a path and don't put captions on the points I get this error. Line 343: $caption = $matches[4]; It seems like this assignment should check if $matches[4] exists first, or is this OK in php? Regardless, I get the error messages appearing on the wiki webpage. SDDR 02:54, 29 April 2007 (UTC)


 * Replacing the above line with this stops the Notice from displaying

if ( isset( $matches[4] ) ) $caption = $matches[4]; else $caption = null; SDDR 10:23, 29 April 2007 (UTC)


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

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)

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?

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 ?

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

Can't find GoogleMaps.php
The error message I'm getting is: Warning: require_once(/extensions/GoogleMaps/GoogleMaps.php) [function.require-once]: failed to open stream: No such file or directory in /home/XXXXX/domains/YOURDOMAIN.com/html/LocalSettings.php on line 129

Fatal error: require_once [function.require]: Failed opening required '/extensions/GoogleMaps/GoogleMaps.php' (include_path='/home/XXXXX/domains/YOURDOMAIN.com/html:/home/10341/domains/YOURDOMAIN.com/html/includes:/home/XXXXX/domains/YOURDOMAIN.com/html/languages:.:/usr/local/php-5.1.6-6/share/pear') in /home/XXXXX/domains/YOURDOMAIN.com/html/LocalSettings.php on line 129


 * You don't need the first slash before the word extension</tt> in the require_once</tt> function call. It should be

require_once( "extensions/GoogleMaps/GoogleMaps.php" ); SDDR 07:23, 30 April 2007 (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

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)

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)

Connects points across map--ignores streets / markers not showing up in page
My googlemaps extension works except for the fact that when you connect points...it just draws a line right through the map to connect them--completely ignoring streets and such. Is there any way to fix this?

Also, I've noticed that the little place-marker balloons show up in edit mode but not when you preview/save the map...

I have Mediawiki 1.6.10 and Extension 0.7.7 and I'm currently using IE 6 and Firefox 1.5.0.9 (only because that's what users will be using) but it doesn't work on either browser.

I've re-traced all my steps from installation a few times and I still can't figure out what the problem is. Can someone help me on this? This is part of a project so a deadline is attached--Please help me! Thanks --Lolade 19:39, 25 March 2007 (UTC)


 * It's intentional that connecting points creates a straight line. If you want to have the line follow streets, just make multiple straight lines (you can do this just by clicking different spots on the map after clicking "start a path"). Points that show up as yellow markers will not show up in the final map. This is intentional; they're just there so you can change the shape of the path you draw while you're in edit mode. Hope this helps. --Emiller 05:53, 26 March 2007 (UTC)


 * Thanks for responding so quickly! I didn't realize that was how the maps worked.  Thank you for the tips.  Good to know...  --Lolade 03:51, 28 March 2007 (UTC)

Using Picutres 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)

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: <googlemap category=mytown  lat="32.82422" lon="48.481141">, 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)

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

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)

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)

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)

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

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.

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!

"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?)