Google Maps + Gallery

Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-12-27 05:05
galmoid wrote:
0.4.7b
More about route filters . . .
It appears that route filters that contain an apostrophe in
the name are stored in the database with the apostrophe
escaped by a backslash. I do not know if this is necessary; but,
I see other items in the database (not related to map) that have
apostrophes are not stored this way. If it is actually necessary
to store the route names this way, I think the backslash needs to
be stripped from the name prior to displaying the name. This
would need to be done in both the drop-down list of filters and
on the page above the map when the filter is being used.

The above may be true for other "special?" characters . . . I have
not checked any.

I took a look at that and I don't have that issue. As a matter of fact the "Route filters" are not stored in the database anymore rather created on the fly (as the item composing a route can change)

I have fixed the issue with only the last route filter working (missing "}") ...

I have also found 2 bugs with custom controls when used with "%" for the map size.

So here it is :)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-12-27 05:10
galmoid wrote:
If at all possible, it would be nice if the dreaded over-zoomed
warning/error is -never- able to show it's ugly little text. :-)

That's possible, there is a function in the Gmap that actually checks if the tiles are available.
And there is another function that check for the highest (or lowest depending how you see it:)) zoom possible for a certain point.

The only issue with that is that I can't remember where I saw it :(

It should be easy to fint it on google tho :)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-12-27 05:12
galmoid wrote:
Quote:
Tracklog ... more & more ....
So I now need to find some algorithm to reduce the tracklogs and this should be an all set feature for the next release :-)

If anyone have some idea it would help greatly :). I'll be looking around on the net in case I find something.
-------------------------
The Termite :-)

I ran across this awhile back. The code used (see bottom of page) is
written in 'ruby'; but, maybe you can get some ideas.

Thanks I'll be checking on it :)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2005-12-27 17:42
Termitenshort wrote:
Quote:
0.4.7b
More about route filters . . .
It appears that route filters that contain an apostrophe in
the name are stored in the database with the apostrophe
escaped by a backslash.
The above may be true for other "special?" characters . . . I have
not checked any.

I took a look at that and I don't have that issue. As a matter of fact the "Route filters" are not stored in the database anymore rather created on the fly (as the item composing a route can change)

I have found that the apostrophe problem I am seeing is
related to a PHP setting on my system. The setting is 'magic_quotes_gpc'
and on my system (in php.ini) it is set to 'On'. If I add
this 'php_value magic_quotes_gpc off' to .htaccess I find
that the apostrophe no longer has a backslash in from of it
and the route name is now stored in the database without the
apostrophe.

I guess I am the only one that has faced this situation. I do
not know if it will cause any problems in the future; but, I guess
I will find out . . . eventually.

Thanks for fixin' the other item.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2005-12-27 18:32

I just noticed a new API version was put up (1.30). Appears to work fine.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-12-28 03:01
galmoid wrote:
If at all possible, it would be nice if the dreaded over-zoomed
warning/error is -never- able to show it's ugly little text. :-)

Termitenshort wrote:
That's possible, there is a function in the Gmap that actually checks if the tiles are available.
And there is another function that check for the highest (or lowest depending how you see it:)) zoom possible for a certain point.

The only issue with that is that I can't remember where I saw it :(

It should be easy to fint it on google tho :)

I found this:
http://gallery2.ca/max_zoom.phps
It is a lot of code but works well... You pass it a lat/lon and it gives you back the closest zoom level as a example:
http://gallery2.ca/max_zoom.php?lat=10&lon=-33

Not a single function but....
We could move all of this code into a Class.......with some rewriting. That would be better right?

Dave

 
gjz22

Joined: 2003-12-24
Posts: 6
Posted: Wed, 2005-12-28 06:24

I am having trouble installing. Basically, if I load it up and none of the sub albums have GPS info entered, it shows the blank map centered on 0,0 at zoom level 15. However, when I enter the value of GPS to one of my subalbums to be 18.14,-65.43, the map disappears. I get no errors. Any ideas?

I have the map key entered.

Thanks,
Gabe

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Wed, 2005-12-28 07:24

Deleted . . . dumb post.

 
gjz22

Joined: 2003-12-24
Posts: 6
Posted: Wed, 2005-12-28 08:22

There is an error for any coordinates entered. I enter 0,0 or the coordinates someone else listed above for chicago, I still get the error.

 
gjz22

Joined: 2003-12-24
Posts: 6
Posted: Wed, 2005-12-28 08:35

(no error just a blank screen with no map)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-12-28 13:53

If you only enter one coordinate AND have the "Auto Center and Auto Zoom:" checked ; you will get a error. Do you get a JS error? URL?

Dave

____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
thepeninsula

Joined: 2005-12-28
Posts: 2
Posted: Wed, 2005-12-28 14:00

hi: Small request for assistance, if I may: just installed the map module, and I can't seem to get the icons to align/display properly in either Firefox or IE. Either half of the display properly, or all display with half offset a couple hundred miles west of where they ought to be. I used the internal GPS "get via a map" function to place the GPS (and those don't appear to match the GPS coordinates from Google Earth).

My gallery is at http://miketrinh.net/photoarchive/map

There should be three icons in China, one in Argentina, and one in Morocco. When I have the icon indicating Argentina displayed, the icons in china get offset westward, so that Beijing now appears to be somewhere in Russia, instead of near the korean border. Xian is now in one of the Central Asian republics, and so forth. If I center on china, neither Argentina nor morocco are rendered at all.

I'm running Map module 0.4.7c on Gallery 2.0.2. I've had this problem in my previous install, and thought that upgrading would do the trick. It didn't, so any help you might give would be helpful. Thanks!


Gallery version = 2.0.2 core 1.0.0.2
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7d
Database = mysql 4.0.16
Toolkits = Exif, ImageMagick, NetPBM, Gd
Operating system = FreeBSD 4.10-SATA-RELEASE FreeBSD 4.10-SATA-RELEASE #0: T i386
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Wed, 2005-12-28 18:44
thepeninsula wrote:
hi: Small request for assistance, if I may: just installed the map module, and I can't seem to get the icons to align/display properly in either Firefox or IE. Either half of the display properly, or all display with half offset a couple hundred miles west of where they ought to be. I used the internal GPS "get via a map" function to place the GPS (and those don't appear to match the GPS coordinates from Google Earth).

My gallery is at http://miketrinh.net/photoarchive/map

There should be three icons in China, one in Argentina, and one in Morocco. When I have the icon indicating Argentina displayed, the icons in china get offset westward, so that Beijing now appears to be somewhere in Russia, instead of near the korean border. Xian is now in one of the Central Asian republics, and so forth. If I center on china, neither Argentina nor morocco are rendered at all.

I'm running Map module 0.4.7c on Gallery 2.0.2. I've had this problem in my previous install, and thought that upgrading would do the trick. It didn't, so any help you might give would be helpful. Thanks!


Gallery version = 2.0.2 core 1.0.0.2
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7d
Database = mysql 4.0.16
Toolkits = Exif, ImageMagick, NetPBM, Gd
Operating system = FreeBSD 4.10-SATA-RELEASE FreeBSD 4.10-SATA-RELEASE #0: T i386
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

thepeninsula,

Welcome to the club! I have a similar problem as you where I have markers in the USA, Hawaii, Japan, Thailand, Singapore. Panning the map around (East or West) also repositions (offsets) my markers. This issue has to do with the International Dateline. In the map module if you "Enable the Dateline Fix" this should prevent your markers from disappearing but they will still be offset when you pan your map East or West. This workaround is based on http://www.econym.demon.co.uk/googlemaps/dateline.htm

I've found some other possible workarounds browsing the Google Maps API discussion group but haven't researched them enough yet.
For now you could (1) reduce the size of your map, (2) set your Map zoom level to a lower value, (3) create Legends and/or create Group/filters to hide the marker offsetting.

True, the GPS coordinates from Google Earth are not the same as Google maps. GE uses DMS (Degrees, Minutes, Seconds) and Google Maps uses the decimal format.

 
thepeninsula

Joined: 2005-12-28
Posts: 2
Posted: Wed, 2005-12-28 20:35

Well then, these workarounds will just have to do. I suspected it had something to do with the dateline, but the offset threw me for a loop. I'll fiddle more and report back if I come up with anything.

Swordfish, I appreciate the help!

 
hardtoneselector

Joined: 2005-03-08
Posts: 46
Posted: Thu, 2005-12-29 06:00

I just upgraded to the actual Version .4.7c and I still can not get it to work,...
always when I hit ../gallery2/main.php?g2_view=map.ShowMap then I will recieve the following error:

Fatal error: Call to a member function getId() on a non-object in .../gallery2/modules/map/ShowMap.inc on line 362

Can somebody can give me a hint what to do? What I could have wrong?

Thanks
bernie

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2005-12-29 07:18
hardtoneselector wrote:
I just upgraded to the actual Version .4.7c and I still can not get it to work,...
always when I hit ../gallery2/main.php?g2_view=map.ShowMap then I will recieve the following error:

Fatal error: Call to a member function getId() on a non-object in .../gallery2/modules/map/ShowMap.inc on line 362

Can somebody can give me a hint what to do? What I could have wrong?

Thanks
bernie

Have you entered coordinates on any of your photos?
At least two.
Edit Photo/Google Map

 
gjz22

Joined: 2003-12-24
Posts: 6
Posted: Thu, 2005-12-29 23:45

I figured out the issue with my gallery. I used a ' in the name, and the map theme is not escaping that, so it breaks the javascript to use a '. So I guess it is a bug.

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 00:50

I am hoping that someone can help me as I have tried what seems like all the options on the Map Theme page and have never gotten it to display the pictures at the same time as google map since I added the images to the album. When I followed the instructions, all I get is a map with my changed starting coordinates and the zoom level. I have added all the GPS coordinates to my photos and if I switch to the Matrix Theme, it shows the GPS coordinates at the bottom of the photo.

I am not sure if I am missing something but there are no points on my map and there is no legend.

Thanks in advance,
Randy

http://randy-wilson.com/gallery/v/travel/

---------------------edit--------------------------
I have installed the module (.47c) and that appears to be working but it is still not showing up with my GPS points or even a legend even though I have it set up to do so. I may be missing something in the PROFILE relating to the server name (is this supposed to be just the www.domain.com or www.domain.com/gallery/v/travel/ ??

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 00:58
gjz22 wrote:
I figured out the issue with my gallery. I used a ' in the name, and the map theme is not escaping that, so it breaks the javascript to use a '. So I guess it is a bug.

Actually this would not be a bug, Javascript terminates (or actually ends the command/starts next command) with a single quote/apostrophe. This would be the way that Javascript is expected to act.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-12-30 02:46
t001z wrote:
I am hoping that someone can help me as I have tried what seems like all the options on the Map Theme page and have never gotten it to display the pictures at the same time as google map since I added the images to the album. When I followed the instructions, all I get is a map with my changed starting coordinates and the zoom level. I have added all the GPS coordinates to my photos and if I switch to the Matrix Theme, it shows the GPS coordinates at the bottom of the photo.

I am not sure if I am missing something but there are no points on my map and there is no legend.

Thanks in advance,
Randy

http://randy-wilson.com/gallery/v/travel/

---------------------edit--------------------------
I have installed the module (.47c) and that appears to be working but it is still not showing up with my GPS points or even a legend even though I have it set up to do so. I may be missing something in the PROFILE relating to the server name (is this supposed to be just the www.domain.com or www.domain.com/gallery/v/travel/ ??

Just Add a Profile and enter randy-wilson.com for the Server Name.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-12-30 02:53
gjz22 wrote:
I figured out the issue with my gallery. I used a ' in the name, and the map theme is not escaping that, so it breaks the javascript to use a '. So I guess it is a bug.

t001z wrote:
Actually this would not be a bug, Javascript terminates (or actually ends the command/starts next command) with a single quote/apostrophe. This would be the way that Javascript is expected to act.

We should escape the ' in the name or remove it altogether. So it is a bug in the module but not in JS.
Where is the name that uses the '? The item or the route or the filter? I can't seem to reporoduce.

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 05:06
swordfish wrote:
t001z wrote:
...
http://randy-wilson.com/gallery/v/travel/

---------------------edit--------------------------
I have installed the module (.47c) and that appears to be working but it is still not showing up with my GPS points or even a legend even though I have it set up to do so. I may be missing something in the PROFILE relating to the server name (is this supposed to be just the www.domain.com or www.domain.com/gallery/v/travel/ ??

Just Add a Profile and enter randy-wilson.com for the Server Name.

That is the way that it was set up and I am still only getting the general map with no points on it (no pictures are visible on the page either) but if you click "view slideshow" it will display or allow you to view all the images in the album.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2005-12-30 16:10
t001z wrote:
That is the way that it was set up and I am still only getting the general map with no points on it (no pictures are visible on the page either) but if you click "view slideshow" it will display or allow you to view all the images in the album.

I took a look at your gallery (top level) and upon selecting
Show Google Map from the Album Actions drop down, was presented
with this on the page . . .
---
Photo Map
You do not have a profile setup for this website to use the Google Map
---
Since you 'worked long and hard' I'd be happy to have a look
at your settings; but, you would need to PM me some admin
access.

 
WyoCracker

Joined: 2005-12-30
Posts: 4
Posted: Fri, 2005-12-30 17:00

Having trouble with my API key. I originally created one for the Gmap Theme for this URL:

http://flatirons.thirstday.com/gallery/

And it worked just fine. But then when I installed the module I get a warning message saying the key belongs to a different URL. So I then got a new key for just:

http://flatirons.thirstday.com/

Same problem. Per instructions I included some code in the ShowMap.inc file to display my server and port settings. It game me the expected:

flatirons.thirstday.com
80

I have entered that in the profile and fiddled around with many different combinations but to no avail. Anyone with any easy ideas one where I can troubleshoot some more? I find it weird that the key worked for the theme but not now w/ the module.
Thanks for the help.

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 17:09
WyoCracker wrote:
Having trouble with my API key. I originally created one for the Gmap Theme for this URL:
......
I have entered that in the profile and fiddled around with many different combinations but to no avail. Anyone with any easy ideas one where I can troubleshoot some more? I find it weird that the key worked for the theme but not now w/ the module.
Thanks for the help.

I originally got this same message, but when I looked on Google's API pages it stated that the API is only good for one FOLDER meaning if your key was assigned to a /gallery and your map is located under /gallery/v/somefolder it will not work. This is contrary to what the documentation for the module states.

Of course I am not a shining example as mine is not working correctly yet, but I can see the map if I am logged into my site as admin :)

Here is a discussion laying out exactly what I referenced earlier.

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 17:19
galmoid wrote:
I took a look at your gallery (top level) and upon selecting
Show Google Map from the Album Actions drop down, was presented
with this on the page . . .
---
Photo Map
You do not have a profile setup for this website to use the Google Map
---
Since you 'worked long and hard' I'd be happy to have a look
at your settings; but, you would need to PM me some admin
access.

Thank you for your offer to help, I have sent you a PM with access information. If I am logged into gallery with admin rights (have not tried with another logged in user) I can choose Show Google Map and it appears just as desired.

If I am not logged in, it tells me that "You do not have a profile setup for this website to use the Google Map, review you settings in the Admin Panel or Check the wiki". Of course the Wiki does not exist and the Admin Panel is where I seem to be missing something anyway.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2005-12-30 17:31
t001z wrote:
Thank you for your offer to help . . .

Try it now. Sent you a PM.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-12-30 17:38
WyoCracker wrote:
Having trouble with my API key. I originally created one for the Gmap Theme for this URL:

http://flatirons.thirstday.com/gallery/

Try this key:
ABQIAAAA7YtUWKir_7wkZC2B2FpbKBQhsNCS1YKaPwIarU8tkT_uwki1uxShaiNiGz2KlyBG5rurVY5FyNk8ig

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 17:45
galmoid wrote:
Try it now. Sent you a PM.

Thanks, that seemed to take care of the big problem. I have one more question (and then I will leave you alone :)). When someone clicks on the picture to go to the gallery, I wanted them to be taken directly to the Map. I am not sure if this is something that can be done without the Map Theme (which I deactivated earlier, but is still on my server).

The pictures by themselves do not mean much since they are from several different albums, I just wanted them in that album for the map.

 
WyoCracker

Joined: 2005-12-30
Posts: 4
Posted: Fri, 2005-12-30 17:56

Hmmm, tried that key (and using the server address of: flatirons.thirstday.com/gallery & flatirons.thirstday.com) and also generating new keys per the other suggestion listed above, but neither worked. Wondering if it could be one of two other things:

1. Permissions? Do I have to have anything set specially anywhere?

2. I have a feeling I'm not feeding it the proper server addres, I might have a misunderstanding about where the maps sit. I installed the module in the default directory of
/gallery/modules/map
So do I generate a key for
http://flatirons.thirstday.com/gallery/modules/map
or
http://flatirons.thirstday.com/gallery/v/
I haven't quite figured out how the URL's are getting created.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2005-12-30 18:08
t001z wrote:
Thanks, that seemed to take care of the big problem. I have one more question (and then I will leave you alone :)). When someone clicks on the picture to go to the gallery, I wanted them to be taken directly to the Map. I am not sure if this is something that can be done without the Map Theme (which I deactivated earlier, but is still on my server).

The pictures by themselves do not mean much since they are from several different albums, I just wanted them in that album for the map.

I don't think I understand, completely, your question. Maybe
try activating 'Show Album Filters' in the map admin section
'Group/Filter Management'.

It is probably not quite what you want; but, will at least
filter the markers by album.

I do not use the theme you mention so cannot comment on it or
it's capability. :-)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2005-12-30 18:13
WyoCracker wrote:
Hmmm, tried that key (and using the server address of: flatirons.thirstday.com/gallery & flatirons.thirstday.com) and also generating new keys per the other suggestion listed above, but neither worked. Wondering if it could be one of two other things:

1. Permissions? Do I have to have anything set specially anywhere?

2. I have a feeling I'm not feeding it the proper server addres, I might have a misunderstanding about where the maps sit. I installed the module in the default directory of
/gallery/modules/map
So do I generate a key for
http://flatirons.thirstday.com/gallery/modules/map
or
http://flatirons.thirstday.com/gallery/v/
I haven't quite figured out how the URL's are getting created.

I get this when visiting your site and selecting Show Google Map:

There is no item with GPS coordinates

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 18:17

No, I think what I want to do is simply change the theme to the Map Theme instead of the Matrix theme and have that load by default. I will keep my fingers crossed and hope for the best!!

Thanks again for your help.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-12-30 18:20
WyoCracker wrote:
1. Permissions? Do I have to have anything set specially anywhere?

Nope

WyoCracker wrote:
2. I have a feeling I'm not feeding it the proper server addres, I might have a misunderstanding about where the maps sit. I installed the module in the default directory of
/gallery/modules/map

That is right

WyoCracker wrote:
So do I generate a key for
http://flatirons.thirstday.com/gallery/modules/map
or
http://flatirons.thirstday.com/gallery/v/
I haven't quite figured out how the URL's are getting created.

A key for http://flatirons.thirstday.com should work.

You might want ot upgrade as well (make sure you overwrite exsisting files) see:
http://gallery.menalto.com/files/map-module-0.4.7c.zip

Upgrade and see if that helps if not then;
PM me your info and I will have a look.
Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-12-30 18:23

swordfish and others had a issue when selecting the custom navigation and using the legend at the same time:
http://gallery.menalto.com/node/32642?from=1450#comment-158040

Attached are some files that will fix this issue as well as if your Gallery/CMS theme uses .png images.
/templates/MapHeader.tpl: I now only add the .htc fix to the map <div>. (this should fix other issues as well)
/templates/ShowMap.tpl: Give the map <div> a class.
/templates/blocks/Legends.tpl: I added a height and width to the legend down button. and added png fix to the group icon.

Please test and let me know if there is any issues.

EDIT:
see update below:
http://gallery.menalto.com/node/32642?from=1550#comment-159333
____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Fri, 2005-12-30 18:33

.... And when I tried the Map Theme, the correct term would be CRASH AND BURN!!!!

I have moved it back and just added an edit telling people to go to the map from the drop down. It will be easier that way.

 
WyoCracker

Joined: 2005-12-30
Posts: 4
Posted: Fri, 2005-12-30 18:51

Ah HAH. Upgrade worked with the key generated for:
http://flatirons.thirstday.com/

I should have known better. My last batch of code was from just before Christmas, figured it was recent enough. Apparently you guys are burning right along, very nice. (I also like the addition of the 'Edit Profile' button.)

Many thanks for the helpful suggestions and sorry to be a such a loose nut behind the keyboard. (I'm blaming it on the flu)
Graeme

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-12-30 19:04

Glad you got it sorted

Dave
____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2005-12-30 20:17
t001z wrote:
.... And when I tried the Map Theme . . .

See PM.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-12-30 21:17
floridave wrote:
swordfish and others had a issue when selecting the custom navigation and using the legend at the same time:
http://gallery.menalto.com/node/32642?from=1450#comment-158040

Attached are some files that will fix this issue as well as if your Gallery/CMS theme uses .png images.
/templates/MapHeader.tpl: I now only add the .htc fix to the map <div>. (this should fix other issues as well)
/templates/ShowMap.tpl: Give the map <div> a class.
/templates/blocks/Legends.tpl: I added a height and width to the legend down button. and added png fix to the group icon.

Please test and let me know if there is any issues.

____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

floridave,

Sweet! Tried your modified files and they work good for me with minor issue. On FF the Group icon does not appear and on IE6 the Photo Legend seems to be 'centered' instead of left aligned. See attached screenshots.

 
david_b_ferguson

Joined: 2003-05-06
Posts: 1
Posted: Fri, 2005-12-30 22:40

Think I found a bug in 0.4.7c in that if you add coordinates for an album with no thumbnail, the module breaks. I get the following error:

PHP Fatal error: Call to a member function on a non-object in <g2root>/modules/map/ShowMap.inc on line 340

The error relates to the following code:

$pointHash[$entity->_id]['thumbLink']=$gurl->generateUrl(
    array('view'=>'core.DownloadItem',
    'itemId'=>$thumbs[$entity->_id]->getId(),
    'serialNumber'=>$thumbs[$entity->_id]->getSerialNumber()));

Perhaps some preliminary checking can be added to fix this?

Also, when I try generating a route across the Pacific, the map insists on drawing it the 'long way' round. See here for what I mean. Any way of fixing this? Is it related to the dateline bug?

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2005-12-30 22:45
t001z wrote:
Replay .... And when I tried the Map Theme . . .

See PM, again.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-12-30 22:50
david_b_ferguson wrote:
Perhaps some preliminary checking can be added to fix this?

We could add some more checking but where do we stop? How often does a album not have a thumbnail?

david_b_ferguson wrote:
Also, when I try generating a route across the Pacific, the map insists on drawing it the 'long way' round. See here for what I mean. Any way of fixing this? Is it related to the dateline bug?

I bet it is related to the dateline bug.
Can you add 2 routes and have them just stop/start at the date line? I know you don't have a item there at the date line but might be a workarround.

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-12-30 23:10
swordfish wrote:
floridave,

Sweet! Tried your modified files and they work good for me with minor issue. On FF the Group icon does not appear and on IE6 the Photo Legend seems to be 'centered' instead of left aligned. See attached screenshots.

Updated the files again and also included showMap.inc

We are starting to move some of the CSS info to the MapHeader.tpl file. You should be able to fix some of the css issues there. Later on we will move the CSS to it's own file.
Let us know if we need to change some CSS stuff.

Dave

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Sat, 2005-12-31 02:01
galmoid wrote:
Quote:
Replay.And when I tried the Map Theme.

See PM, again.

Thanks for all your help. Got problem with ' in description on the same images where coordinates are listed. Now the only two things I have to do is 1) figure out how to get my images on top of the map (should not be too difficult) and 2) figure out why some of my description boxes that appear when clicking on an image are SOOOOOO long. Some are sized correctly and others are as wide as my screen is (and at 1920x1200, that is saying something), the odd thing is how inconsistant this is. Also, on the ones that are SOOOO long, the text from my description "falls out" of the bubble but is still displayed over the map.

http://www.randy-wilson.com/gallery/v/travel/

Thanks again galmoid for all your help!

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2005-12-31 05:03
floridave wrote:
swordfish wrote:
floridave,

Sweet! Tried your modified files and they work good for me with minor issue. On FF the Group icon does not appear and on IE6 the Photo Legend seems to be 'centered' instead of left aligned. See attached screenshots.

Updated the files again and also included showMap.inc

We are starting to move some of the CSS info to the MapHeader.tpl file. You should be able to fix some of the css issues there. Later on we will move the CSS to it's own file.
Let us know if we need to change some CSS stuff.

Dave

Nice! Good to go.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sat, 2005-12-31 07:03
t001z wrote:
Thanks for all your help. Got problem with . . .

You're welcome. Hang in there. I'm messin' around with this
theme. I have (I'm sorry to say since you went through the
trouble of removing them (due to my last response) :-)) solved
the apostrophe problems. I think I may have a solution for
your lonnnnnng descriptions also. I also found how to move the
pics to the top as well as removing, the stuff above the map (I
think it is unnecessary; but, someone others may disagree).
I'll try and get it all cleaned up and post a 1.0.3a version
tomorrow. Oh yea, I also fixed the off-setting of the first/previous
links when you are viewing pics in the gallery (maybe no one else
noticed this).

I'm pretty sure that, at least you, will like it.

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Sat, 2005-12-31 20:30
galmoid wrote:
You're welcome. Hang in there. I'm messin' around with this
theme ...
I'm pretty sure that, at least you, will like it.

Thanks, I will wait for your post!!

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sat, 2005-12-31 20:50

EDIT: I pulled the zip file pending contact
with the owner of this theme. I'll update us when
I received word.
-----
I hope the owner of this theme does not mind what I
have done.

I have worked on the map theme (not to be mistaken for
the Google Map module). There are several things that I
fixed and enhancements (open to interpretation :-)) I
have made. I changed the version (in theme.inc) to
be 1.0.3c (it was 1.0.3 even though the zip file
that I downloaded said 1.0.3b). Going to Site Admin
and selecting Themes/All Themes will ask that you
upgrade and activate the map theme if you replace your
existing map theme directory with the one in the zip
file.

- Fixed a problem where apostrophes that are used in
titles, summaries or descriptions would break the
javascript because they were not being escaped.

- Fixed a cosmetic problem where the navigation links
that appear when viewing the pics (actual pics in your
image gallery) would get off-set by one line between
the link on the left and the link on the right (maybe
nobody ever noticed this).

- Fixed the infowindows where long descriptions (and I
suppose summaries) would cause the infowindow to display
poorly. Di this by "table-izing it. There -is- some
funky stuff that seems to happen to infowindows when a
description/summary is large. Sometimes there is an
"artifact" that appears at the bottom of the infowindow.
Sometimes the infowindow has whitespace in the lower
portion; but, will size itself correctly if another
pics infowindow is opened and then the other re-opened.
If you re-open it immediately it gets messed up again.
I know my attempt at an explanation is weird; but, so
is the infowindow. This strange behavior is not limited
to the map theme. Seems that similar behavior happens
with infowindows in the module. This all relates to FF.
IE appears to handle it a little better.

- Changed the navigation thumbnails to be 80x60 (they
look better for me) from 80x80. You can easily change
this size by editing you theme.css file where you will
find '#customthumbs' at the bottom. I think the settings
are self-explanatory. I also added 'padding: 1px;' to
this entry to give a slight separation to the thumbs.
If you remove the width and height settings, the
navigation thumbs will be displayed the same size as
your normal thumbnails (the size that is seen in the
infowindows).

- Changed the operation of links that appear in the
infowindows to operate like the 'g' infowindows in
the Google Map module. They will open in a new window
instead of in the current window. Clicking on any links
in any infowindow will always open in the same new
window if it is not closed.

- Descriptions or summaries are contained in a div that
has a width set to 300px (seemed to work nicely for
long text).

- Removed the stuff above the map to give a cleaner
look. I like it; but you may not. :-)

- Added a configuration item to the theme admin screen
to place the navigation thumbs above or below (top or
bottom) of the map. It is 'Place custom thumbs above
or below map' (There is a call to 'translate' this; but,
I know nothing of doing such things and have no idea if
this call will cause problems when the theme is used
under a language other than English. I just copied an
already existing entry and changed some stuff.

The files that I have changed:
** Note: these files are a mixture of unix and dos
files. The unix files will not display properly in
windows notepad; use wordpad instead.

- Created a templates/local directory where the .tpl
files I changed (theme.tpl, album.tpl, photo.tpl) are
located. The original .tpl files are still in the
templates directory. You can replace the original files
in the templates directory with the ones in the local
directory if you like (and then delete the local
directory)
- theme.css (original file is saved as theme.css.orig)
-- Note: theme.css.old was already there
- theme.inc (original file is saved as theme.inc.orig)

Sorry for the long wordy post (too much no-doz, again).

I sure hope that this works on systems other than just
mine and doesn't break anything anywhere. Use it at
your own risk. :-)

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2005-12-31 21:32
galmoid wrote:
I hope the owner of this theme does not mind what I
have done.

I have worked on the map theme (not to be mistaken for
the Google Map module). There are several things that I
fixed and enhancements (open to interpretation :-)) I
have made. I changed the version (in theme.inc) to
be 1.0.3c (it was 1.0.3 even though the zip file
that I downloaded said 1.0.3b)....

Sounds cool! Someone post a screenshot or link as I'd like to see how this looks.
I would of changed the version to 1.0.4 since you made alot of changes and keep the two separate for now (inquire with the original owner?) and post a download link with brief description on the Wiki. Perhaps both here http://codex.gallery2.org/index.php/Gallery2:Modules:Map and here http://codex.gallery2.org/index.php/Gallery2:Themes:Map . I suspect alot of (new) folks may get confused and more folks may now be interested in the Theme vs the module. Just my 2cents.