0.5.0c runs (nearly) perfect on my 2.1/PGtheme setup - I'm able to configure and set map locations now properly. All settings are saved.
Setting Pin's works too - but trying to display the map from the Gallery menue ends in a "Loading, please wait..."
Same with the "Show Map Button" on the admin screen.
Just checked on IE and noticed a few Scrip errors "Error 'myWidth' is undefined".
Any idea?
Best regards,
Lutz
Gallery version = 2.1-rc-1a core 1.0.29
PHP version=5.1.2 apache2handler
Webserver=Apache/2.2.0 (Win32) DAV/2 PHP/5.1.1 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database=mysql 5.0.18-nt-log
Gallery-URL=http://lf-photodesign.de
Posts: 1894
The myWidth error is a result of an another javascript error before that specific code.
it seems you have the Automatic regroup enabled, can you try to disable it and let me know ? I think I need to revisit that code from start to finish .... it's starting to upset me that I don't know how it works
Thanks
-------------------------
The Termite
Posts: 1023
Termite, you were absolutely right - with automatic regrouping disabled, the map displays perfectly. (I was even able to reload all my pre 2.1 pins again from my db backup)
Gallery version = 2.1-rc-1a core 1.0.29
PHP version=5.1.2 apache2handler
Webserver=Apache/2.2.0 (Win32) DAV/2 PHP/5.1.1 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database=mysql 5.0.18-nt-log
Gallery-URL=http://lf-photodesign.de
Posts: 1894
Now that's better news
PS: did you add yourself here: http://termite.responsiveweb.com/MapModuleTeam/main.php
-------------------------
The Termite
Posts: 1023
rePS: yup - already added myself "Date: 04/28/2005" ))
Gallery version = 2.1-rc-1a core 1.0.29
PHP version=5.1.2 apache2handler
Webserver=Apache/2.2.0 (Win32) DAV/2 PHP/5.1.1 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database=mysql 5.0.18-nt-log
Gallery-URL=http://lf-photodesign.de
Posts: 40
hmmm, i've got the same problem, but in theme settings of google map, i don't see a 'automatic regroup' (or album based regroup or whatever it's called)... I just upgraded to the latest version, both gallery2 and googlemap. (055 i think).
Any ideas? Thanks!
Posts: 40
ok, found it now, had to enable 'markers settings', but regrouping isn't enabled and i still have the same problem as described in the first post of this thread...
Posts: 508
We'll need a link to diagnose it. Send it to me by PM if you don't want it public.
Posts: 314
Has this been solved? I'm having the same problem in Map Module 0.5.6 and Gallery 2.2.4. I have tried the options mentioned above to no effect.
However, this only occurs for the default map. The maps for a specific album are displayed normally. Also, it used to work, not sure when it broke. From 0.5.5 to 0.5.6?
See http://www.claessen.ca/photos?g2_view=map.ShowMap
Posts: 508
What problem are you having? Your map looks correct to me, with no Javascript errors.
Posts: 314
You're right. Somehow the error only appears when I'm logged into my Gallery (most of the time). When I logout, the page displays normally.
It is the same error message as in the opening post: "Error: 'myWidth' is undefined" on line 276.
Posts: 508
Hmm... Then that may be a performance problem. Tricky to diagnose, but the solution should be pretty straightforward, if time consuming. I need to make the map module database access much more efficient. It's currently doing one database call per item, instead of collecting them all into one big query and then extracting the results. I'm planning to do this, but I have a lot going on right now.
How many items do you have in your gallery? How many have coordinates?
Posts: 314
My Gallery has 2445 items, but only around 200 have GPS coordinates (including albums).
My PHP Memory Limit is set to 64MB, it got increased after I got a blank plugins page. Because I use WPG2 (Gallery within WordPress), it uses more memory and it may be a memory limit issue. I also get blank pages when I want to go to markersets or groups (don't currently use these features).
I'll try playing around with the memory limit this weekend.
Any optimizations to the module are great appreciated, I love the functionality!
Posts: 508
That would be my guess, too. I think 128 MB may be good, but to rule it out (or in) try something way over like 512 MB. You don't have an excessive amount of items (my prod gallery has 3400+), and 200 items with coordinates isn't all that much.
Posts: 314
Played around a bit with the memory limit, but to no effect. The Javascript error disappeared with a high (256MB) memory limit, but I still didn't get the map. But since my viewers do not notice anything, I just logout or use a different computer to see map changes.
Posts: 508
Well, that's a key point, though--the Javascript error went away, so something changed. Maybe I'll create an account on your site and see what sort of error occurs.
Posts: 508
Oops, I guess I can't. I didn't see a log in/register link on your site anywhere.
Posts: 314
Eh, no, you see, it's _my_ site. I don't share :D
Let me see if I can setup another account, or can reproduce the problem in a test gallery. However, that one doesn't use WordPress and WPG2, which may actually be causing this. This is a low priority issue for me though.
Posts: 314
The priority on this issue changed for me after uploading some 135 photos with GPS information. I now have about 340 photos with GPS information on a total of 2600 items, and get the following effect.
When I view the map of one album, it's fine. When I view the map of multiple albums or the main map, I get a JavaScript error.
So this error is now viewable without the need for an account. Even boosting the php memory limit to 512MB did not change the error message I got. It would be great if you have any clues about what's causing this.
Posts: 508
Any chance you could turn on PHP error reporting, at least temporarily, and see if any errors turn up? That would help me nail down the location of the error (I'm fairly certain it's somewhere in ShowMap.inc). Post the results here.
Posts: 314
I just turned on PHP error reporting (E_ALL), but no errors showed in error_log. Not sure if I'm doing everything right though. Just turned on error reporting in php.ini.
Posts: 508
Are you sure you used the right file? On my development system, there are php.ini files in a ton of places, but only the one located in the same spot as the apache module worked. Also make sure you restart your web server if you're using a module. In my experience, the errors should show up inline with the rendered HTML, so you'll see it on your screen. You could also try introducing an intentional error and see if it shows up.
Posts: 314
I don't have access to the apache module location, but I put php.ini in the root of my site, and if I change values like php memory_limit, these are effective immediately. Errors have been on all along anyway, but the notices were turned off. I'm not sure if php is actually having problems, it just seems that it jumps over the code that generates the Javascript in the HTML header.
Posts: 508
Well, that sucks. I'm (fairly) convinced it's happening in ShowMap.inc, but I don't know where. If the loadTemplate() function barfs somewhere, it won't show the Javascript (it's loaded in a header file), and you'll get the errors you're seeing. Did you try turning off all the options (no overview, zoom, etc.)? Don't do it from the main Google Map Site Admin tab--that just hides the other tabs. You have to go to each tab and disable each function (stupid, I know).
Posts: 314
All the options are off, I only use 1 filter, but that doesn't show unless requested.
I was just thinking: this is purely caused by volume. Before adding those last 150 photos with GPS everything worked fine. I can also see the maps of a parent album with child albums of which only a few photos have GPS information, so the problem is not related to parent albums either. Only the main album and parent album with some 225 photos with GPS information do not show. Is there a maximum number of markers somewhere?
Posts: 508
You're probably right about the volume, but that's an awfully small number of points to have those problems. I'm fairly sure there are users with many more markers. Did you turn off automatic regroup, too?
I'm afraid it's going to have to wait until I have time to do a significant rewrite, and I don't know when that will be. I'll try to work on it next week (business trip).
Posts: 314
Automatic regroup is turned off as well.
I'm going to try a clean install in a test Gallery on the same server this weekend. See if it works there.
Posts: 314
It works in a test Gallery on the same server. Then I realized: what if I open my Gallery outside of WordPress/WPG2? And yes, it still works there. That makes it all the more complicated, because apparently something goes wrong between WPG2 and the Gallery2 Google Maps Module when there's a large number of items with GPS info to display. I already boosted my php memory limit, and it is being displayed properly in some of the maintenance tasks of Gallery2 within WordPress.
I think I'm going to bug the programmers of WPG2 now, as the Gallery2 Google Maps module is working standalone (even though it could use a performance boost). Let me know if you have any other ideas.
Posts: 27300
post the thread so we can keep up to date on what ozgreg has to say.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 314
I just posted it here.
Posts: 508
I was wondering if it had something to do with the Wordpress integration. There's still definitely room for improvement in the Map module, though...
Posts: 314
As there does not appear to be a solution to this problem right now, I'm thinking of working my way around it.
Do you know if it's possible to get the Google Map in a pop-up? When clicking on the Google Maps link, I would like a new window to open with only the map. That way I would be able to have the map outside of WPG2 (where it displays properly) without having the navigation links that allow people to browse my gallery outside of WPG2.
Posts: 508
There's probably a few ways you could try. The map has a couple "fullscreen" modes: add the parameter "&g2_fullScreen=1" (you can try a value of 2 or 3 to see which one you like the best); you'd just have to create a link to the map that made it launch in a new window. The other way is to possibly use the map block somehow, but I'm not sure how it would work, outside of using g->block in a smarty template.
Posts: 1378
You would need to change the base URL when doing a popup to ensure the URL's are not being generated via WPG2, that is they are via main.php
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 40
No wordpress or other embedding here, but same problem, and more or less same amount of photos and gps coordinates.
Sometimes I can see the map (logged in/out) on Firefox, but with IE it's mostly hopeless.
Used to work fine until a few months ago. I don't know if there ever was a real change.
http://www.gran-canaria-info.com/photos/main.php?g2_view=map.ShowMap
Posts: 508
I'm sorry you're having difficulty with the module. You have a nice site there. I took a look at your map link with both IE and Firefox and it seemed to work fine for me. I see you have almost 6000 photos in that gallery. How many have coordinates? Also, did you change your PHP memory limit?
Posts: 40
First of all: thank you for the module! It really is a great feature for me and my visitors. Now, as I was reading through this thread, I tried disabling the regrouping so I guess that has done the trick as I don't get empty pages now either. I'll keep an eye on this thread to see if you manage to find time for the module cause i really love it. So thanks!
Posts: 508
Well, thanks, but I'm not the author. I'm just the (current) maintainer. My major contribution was the rewrite of the Google Earth export. I'll see what I can do to find time to work on this, but it's slow. There's a lot of stuff that has to be reworked. I found that out even while working on the "simple" change to the map key profiles (which is 3/4 done, but I have no test platform anymore...)
Posts: 40
What kind of 'test platform' are you looking for? (Maybe I can help.) Maybe we should continue this off forum?
Posts: 508
Oh, I used to have a nice development laptop that had a webserver with PHP, MySql, etc. for testing changes before I released them, but it went away when I lost my job. I just haven't gotten around to setting one up again. I have a few options, but I'm not sure which one is my best option. Also, I will probably get a new laptop with my new job, so waiting for that may be the best option.