[map module] no map is displayed in the gallery

marc_p

Joined: 2006-03-27
Posts: 31
Posted: Mon, 2006-03-27 18:24

I'm trying to use the Google Map module with a gallery2.1 installation.
The configuration seems fine as I can see a map and choose a default location for example (so this is not a Google Key problem).
I can also select a location for a given photo/album from the "edit" page.
But when it comes to showing the map in the gallery, I simply get a "Loading, please wait..." and nothing more.

You can see this on my gallery by clicking on "Show a Google Map":
http://marc-photos.kataplop.net/main.php

I think I read the guide 20 times and didn't see what I'm doing wrong. Any help would be appreciated :)

Thanks,
Marc

Here are some informations on my installation:


Gallery version = 2.1 core 1.1.0
PHP version = 4.3.10-16 apache2handler
Webserver = Apache/2.0.54 (Debian GNU/Linux)
Database = mysqlt 4.0.24_Debian-10sarge1-log, lock.system=flock
Toolkits = Exif, ArchiveUpload, NetPBM, ImageMagick
Acceleration = none, none
Operating system = Linux minime 2.6.8-2-386 #1 Tue Aug 16 12:46:35 UTC 2005 i686
Default theme = matrix
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060324 Ubuntu/dapper Firefox/1.5.0.1

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Mon, 2006-03-27 18:38

Hrm that usually happens when you alter something, do you get this error using api version 1 and 2, which you can set in the google admin? There are several errors on your page, including myWidth which is probably from api2. Theres also a marker error

Error: missing ) after argument list
Source File: http://marc-photos.kataplop.net/main.php?g2_view=map.ShowMap
Line: 246, Column: 25
Source Code:
createMarkerHTML(47.20,05.03, "v/rmll-lsm-dijon-2005/", "RMLL - Rencontre mondiale du logiciel libre - Dijon (LSM)", "d/123-2/rmll-lsm-dijon-2005.jpg", "07/26/05", 10, 113, 150,

are your markers ok? The above should be createMarkerHTML(47.20,05.03) its missing a closing bracket,check if they are all there and set right. Hopefully this helps

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Mon, 2006-03-27 18:50

Try changing the coordinates of the item dotnature mentions from
'47.20,05.03' to '05.03,47.20' (from your other coordinates it looks
like this one is transposed).

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2006-03-27 22:37

Could be a localization problem I had a bit ago. Did you try to set the language default to english ?

-------------------------
The Termite :-)

 
marc_p

Joined: 2006-03-27
Posts: 31
Posted: Tue, 2006-03-28 07:10

dotnature: I tried with both 1 and 2 API and I always have this problem. How do I check if my markers are correct ? I don't know where to look for them :) I tried from the admin page but I don't see anything wrong (but there must be!)

galmoid: Tried that, still same problem :/

Termitenshort: The default language is already english :)

And by looking at the createMarkerHTML calls, I don't think they are wrong as they are declared with 13 arguments and the calls give 13 arguments (on multiple lines)....

Thanks for the help :) If anyone has another idea...

Marc

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Tue, 2006-03-28 17:17

hrm I dont know what it could be, but it's breaking the firefox console, id suggest uninstalling it and download a new one from the forge.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2006-03-28 17:46

In 'Site Admin/Google Map/Theme settings' what is 'Map InfoWindow Template:'
set to?

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2006-03-28 17:58

I am, almost, willing to bet the answer to the above question is
that you are using 'g2default' (g2default.inc) as your infowindow
template. If that -is- the case, there is a bug in that template.
You can use a different template -or- you can perform a simple
fix to it...

Edit 'map/templates/infowindow/g2default.inc' and find:

$map['infowindow']="''
        +'<div style=\";margin-top:10px;width:250px;height:150px;overflow:auto;\">'
        +'<a href=\"'+itemLink+'\" target=\'gpop\' onClick=\"window.open(href, \'gpop\',\'left=20,top=20,scrollbars=yes\').focus();return false;\">'+title+'</a><br/>'
        +'<a href=\"'+itemLink+'\" target=\'gpop\' onClick=\"window.open(href, \'gpop\',\'left=20,top=20,scrollbars=yes\').focus();return false;\"><img src=\"'+thumbLink+'\" width=\"'+thw+'\" height=\"'+thh+'\" alt=\"'+title+'\" style=\"max-width:200px;max-height:200px;\"/></a>
        +'<br/><font color=black><b>Date:</b> '+created+'</font>'";

In the above find:

+'<a href=\"'+itemLink+'\" target=\'gpop\' onClick=\"window.open(href, \'gpop\',\'left=20,top=20,scrollbars=yes\').focus();return false;\"><img src=\"'+thumbLink+'\" width=\"'+thw+'\" height=\"'+thh+'\" alt=\"'+title+'\" style=\"max-width:200px;max-height:200px;\"/></a>

and add a " ' " (single quote) to the end of the line (after </a>).

 
marc_p

Joined: 2006-03-27
Posts: 31
Posted: Tue, 2006-03-28 18:14

galmoid: i tried different templates and always have the same error... I'll try the above fix btw :) Thanks!
I will also try to uninstall / reinstall, but I already tried this yesterday...In fact, I tried the module with g2.0 and had this behavior. Then I upgraded to g2.1, upgraded the map module, and still have the same error...

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2006-03-28 18:51

If you are willing to PM me the necessary access info Gallery
admin and database access), I'd be willing to have a look to see
if I can figure it out. It's interesting that it never worked (an
important fact :-) ).

 
marc_p

Joined: 2006-03-27
Posts: 31
Posted: Tue, 2006-03-28 19:09

dunno if this is interesting, here's the debug output:

	
Photo Map

Notice: Undefined index: AlbumLegend in /var/www/gallery2-multi/marc/g2data/smarty/templates_c/%%2909413070/%%51^516^516608A5%%Legend.tpl.php on line 6

Notice: Undefined index: PhotoLegend in /var/www/gallery2-multi/marc/g2data/smarty/templates_c/%%2909413070/%%51^516^516608A5%%Legend.tpl.php on line 6
 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2006-03-28 20:37

It appears that an Album was configured with coordinates that
were not appreciated by The Module. The coordinates were set
to '05.03,47.20'. Changed them to '5.03,47.20' and The Module
was happy. Looks like a leading zero in the coordinate was
the culprit in this case.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2006-03-28 20:41

Ahah ... thx for the info.

I was about to built a maintenance task to "clean" all of the GPS coordinates of buggy things in them. I will add that to the list of dirt to remove :-)

See you !
-------------------------
The Termite :-)

 
marc_p

Joined: 2006-03-27
Posts: 31
Posted: Tue, 2006-03-28 21:30

Thanks a lot for the help ! :)
It was really appreciated :)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2006-03-28 21:44
marc_p wrote:
Thanks a lot for the help ! :)
It was really appreciated :)

Termite does have a "Future GPSr Aquisition Fund".
Just ask how you too can help. ;-) :-)