Extension talk:Google Maps/Archive/2007

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
 * You can specify icon information in 0.9 and later. --Emiller 21:10, 2 June 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)

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

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)

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)

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)

Problem with lines and RTL page in Hebrew
Hi

I'm having some issues with IE 6/7 and Hebrew MediaWiki 1.8.2. Did your changes so it finally works on IE 6/7, but when the line appears it is offset on the map. If you look at it with Firefox the line is in the correct place.


 * You can see a sample on this page
 * If you'd like to contact me please do so at dan52344 [at] gmail [dot] com

Thanks

Dan
 * This problem is a bug in the Google Maps API and is described here. I'll see about a workaround. --Emiller 04:14, 18 January 2007 (UTC)
 * A tentative fix is in 0.7.6. May or may not work with tabs. --Emiller 04:15, 27 February 2007 (UTC)

It doesn't show the 'create map' option (neither the previous map) in MediaWiki Catalan
Great extension! I have it running in one MediaWiki in Spanish but I did the same for the Catalan version and it doesn't show anything. It worked at the beginning, and I could create and see a map, but not anymore ?:(


 * Now I know what it is: there was a bug in the Catalan translation of google maps. Esenabre 12:48, 22 May 2007 (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)

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)

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)

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)

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)

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 in the require_once function call. It should be

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

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)