Google Maps + Gallery

swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2005-12-31 21:52
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.

floridave wrote:
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

floridave,

Did your latest changes get committed to cvs or are you waiting for Termite to make the call?

Thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2005-12-31 22:40
swordfish wrote:
floridave,

Did your latest changes get committed to cvs or are you waiting for Termite to make the call?

Thanks!

I will wait for Termite to make the call, he might have some changes to make as well.
I don't have CVS and I don't need the _try_ to learn something that I would rarely use. If I learn CVS then something else would have to be forgotten. ;-)

Cheers!

 
lond
lond's picture

Joined: 2005-06-27
Posts: 25
Posted: Sun, 2006-01-01 00:00

Happy New Year!!

//lond

 
dulfer

Joined: 2006-01-02
Posts: 1
Posted: Mon, 2006-01-02 22:07

Hope this is the right place to post a bug.

Version: 0.4.7c
Description: When I use the install link from the admin page I only get a blank page.
Problem: In de file module.inc, function upgrade, when you install map for the first time the variable $currentVersion is undefined, so expressions like 'case ($currentVersion == "0"):' [line 308] won't match. The switch() matches in line 366 and the script fails.
Fix: Changing the line to 'case ($currentVersion == ""):' was enough for me, but I think that a best workaround is needed.
Note: I found this problem only in one of my systems, in other everything was fine.

Hope this helps

 
gjz22

Joined: 2003-12-24
Posts: 6
Posted: Tue, 2006-01-03 22:50

floridave,

Reproducing is easy. Just use a title or a summary that has an ' in it, like "gjz22's album". It needs to be escaped or it will break the JS and thus not show the map.

t001z, yes it is a bug in the javascript not in the way the browser handle's javascript.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Tue, 2006-01-03 23:08
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.

I realize you are talking with floridave about your problem; but,
I am interested in whether you are referring to the map module
-or- the map theme. I have been working on the map theme.

 
rbrown3rd

Joined: 2003-04-23
Posts: 100
Posted: Wed, 2006-01-04 01:17

Thanks so much for developing this module. Somehow, I stumbled my way into getting an operating module and have it embedded in my web site. This is the greatest thing since sliced bread. Thanks a bunch for all the hard work. If you want to see my implementation of this go to http://www.bbbrown.com/ and click on geography/Photo Map in the left menu.

++++++++++++++++++++++++++++++++++++++++
Gallery version 2.0
http://www.bbbrown.com/
Apache/1.3.33
Linux version 2.4.21-32.0.1.ELsmp
PHP/4.3.11
MySQL version 4.0.25-standard

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2006-01-04 05:02
gjz22 wrote:
floridave,

Reproducing is easy. Just use a title or a summary that has an ' in it, like "gjz22's album". It needs to be escaped or it will break the JS and thus not show the map.

t001z, yes it is a bug in the javascript not in the way the browser handle's javascript.

I see we have a issue that we show the escaping slash. BUT I don't see a failure of the Javascript:
http://gallery2.ca/gallery2/main.php?g2_view=map.ShowMap&g2_filter=apostrophe
That link has a marker to a album that has a apostrophe in the title as well as the summary.

Like I said I DO see a issue that the escapes are showing in the summary as well as the filter dropdown but not a failure of the JS.
Like galmoid asked it might just be in the 'theme'?

Dave
____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Wed, 2006-01-04 05:36
floridave wrote:
Like I said I DO see a issue that the escapes are showing in the summary as well as the filter dropdown but not a failure of the JS.
Like galmoid asked it might just be in the 'theme'?
Dave

Galmoid is working on theme and it seems for some reason if there is an ' in the title, summary or description AND you have GPS coordinates for that picture, the theme fails to display the google map.

 
waterfox

Joined: 2006-01-04
Posts: 1
Posted: Wed, 2006-01-04 11:32
floridave wrote:
Radley wrote:

Okay, the plot thickens..it works in the Matrix theme but not the PG theme...as anyone solved this one?

Same with dotnature:
http://www.schwartzplace.com/gallery2/main.php?g2_view=map.ShowMap

I thought that was solved
http://gallery.menalto.com/node/32642?from=1050#comment-154366
and the few replies after that post..

perhaps file a bug on the Wiki so we can track it.

Dave

I have facing some problem. It work fine with FF but trouble with IE!
I'm using 0.47c.

William

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2006-01-04 14:22
waterfox wrote:
I have facing some problem. It work fine with FF but trouble with IE!
I'm using 0.47c.

William

Are you using the PG theme?
URL?

Dave

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2006-01-04 14:28

Well!

Happy new year to everybody :) I have been without Internet access for a bit and that feels weird :( (not in a good way).

Now I'm back and I will also start the work on the module again very soon.

I have read all of the posts a here is a first comment:

I need to gather the changes made by floridave as well as fixes the couple bugs found. This will make a quick version 0.4.7d to use :-)

Right after that I will do the cleaning before adding anymore feature (it will be easier to work on the code after that)

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2006-01-04 14:29
david_b_ferguson wrote:
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:
(...)
Perhaps some preliminary checking can be added to fix this?

Yep sounds like an idea. I'm working on cleaning the module to make it much more simple to read and understand. Adding more error control is also part of this task :)

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?

Yes it is related and I have NOT implemented the dateline fix for routes. I will look at implementing that as well (I got lazy ... sorry)

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2006-01-04 14:30
floridave wrote:
Quote:
floridave,

Did your latest changes get committed to cvs or are you waiting for Termite to make the call?

Thanks!

I will wait for Termite to make the call, he might have some changes to make as well.
I don't have CVS and I don't need the _try_ to learn something that I would rarely use. If I learn CVS then something else would have to be forgotten. ;-)

Cheers!

I will try to make the update to CVS tomorrow or as soon as I can :)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2006-01-04 14:31
dulfer wrote:
Hope this is the right place to post a bug.

Here or wiki are the right places so YES :-)

dulfer wrote:
Version: 0.4.7c
Description: When I use the install link from the admin page I only get a blank page.
Problem: In de file module.inc, function upgrade, when you install map for the first time the variable $currentVersion is undefined, so expressions like 'case ($currentVersion == "0"):' [line 308] won't match. The switch() matches in line 366 and the script fails.
Fix: Changing the line to 'case ($currentVersion == ""):' was enough for me, but I think that a best workaround is needed.
Note: I found this problem only in one of my systems, in other everything was fine.

Hope this helps

Will be fixed in version 0.4.7d and subsequent ;-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2006-01-04 14:33
Quote:
Are you using the PG theme?

I just want to say that the module does not work with the PG theme because of some conflicting Javascript. I have not gotten time to look into this but will after version 0.4.8 is released :)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Wed, 2006-01-04 15:11

Welcome back Termite.

0.4.7c
In my messin' around with the Map Theme (not to be mistaken for the Map
Module!)
I have realized some things that I am applying to the 'g' infowindows.
I continued to find fault in having apostrophes contained in summary and
descriptions. These did not cause the module not to work; but rather,
would show up with the apostrophe preceded (escaped) by a backslash (just
as floridave described above). I tracked where this was happening. It is
in ShowMap.inc...

Unless somebody can say why not...
Line 356/357 (for summary):

356             $pointHash[$entity->_id]['summary']=
357                 preg_replace(array("/'/",'/\n/','/\r/'), array('\\\'','',''), $entity->_summary);

could be changed to:

356             $pointHash[$entity->_id]['summary']=
357                 preg_replace(array('/\n/','/\r/'), array('',''), $entity->_summary);

line 358/359 (fo description):

358             $pointHash[$entity->_id]['description']=
359                 preg_replace(array("/'/",'/\n/','/\r/'), array('\\\'','',''), $entity->_description);

could be changed to:

358             $pointHash[$entity->_id]['description']=
359                 preg_replace(array('/\n/','/\r/'), array('',''), $entity->_description);

Edit: I left this alone
and entered some titles with apostrophes. Looks like
it can remain as is.

I have have not tried this; but probably, it can be done also...
(I would hold off on doing this at the moment until I finish looking
into some change suggestions I've been considering for MapHeader (relating
to the 'g' infowindows - I'll let y'all know latter today)

line 354/355 (for title):

354             $pointHash[$entity->_id]['title']=
355                 preg_replace(array("/'/",'/\n/','/\r/'), array('\\\'','',''), $entity->_title);

can be changed to:

354             $pointHash[$entity->_id]['title']=
355                 preg_replace(array('/\n/','/\r/'), array('',''), $entity->_title);

I've made (at least I think :-)) great progess on the Map Theme (not to be
confused with the Map Module!). I had, previously posted a new version; but,
I pulled it pending communication with the owner (LarryDoliver). I sent a
PM on 12-31 and as yet have not heard back. I have definitely solved the
crash due to apostrophes.
More later...

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Wed, 2006-01-04 16:42

Regarding an update to the 'g' infowindows . . .

Does anybody have any opinion regarding putting some
"value added"(? :-)) links in them? I am thinking
about:
---
Location:
-105.63624,35.9744
View location at Terraserver
(Unfortunately, USA only)
View Localtion at TopoZone
(Unfortunately, USA only)
WeatherBonk.com this location

Zoom In
---
'Location' is already in them and 'Zoom In' is
configurable in -all- infowindows through admin.

What do you think? Any other links? Maybe they could be added
to the admin screen (like Zoom In)? Maybe it is not at all a good
idea?

I know floridave has been looking into the weather thing.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 00:10

0.4.7c
Some cleanup items (I think). Some errors show up in the FF
javascript console.

In ShowMap.inc:
line 989 and 1006

989                $map['preload'] = $map['preload']. "<div style='hidden'><img src='".$imgrep.$file."' style='display:none;'/></div>";

1006                 $map['preload'] = $map['preload']. "<div style='hidden'><img src='".$imgrepA.$file."' style='display:none;'/></div>";

The style='hidden' needs a qualifier like maybe 'visibility' or something.

In MapHeader.tpl:
line 20 and 26

20     fontFamily: Arial, sans serif;

26     fontFamily: Arial, sans serif;

fontFamily needs to be font-Family (I think the case of the characters is
not relevent)

I think line 14 is also problematic; but, I know not what it should be.
Complaint: Ruleset ignored due to bad selector
Expected ',' or '{' but found '*'

13 <style type="text/css">
14    v\:* {
15    behavior:url(#default#VML);
16  }

I don't understand this; but, here ya go...
The only references to z-index I can find are in ShowMap.tpl
Error: Error in parsing value for property 'z-index'.
Declaration dropped.
Source File: gallery/main.php?g2_view=map.ShowMap
Line: 0

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 00:14

Just a quick note. With the problem related to slashes. did anyone try stripslashes
?

It would seem like an easy way if it works :)
-------------------------
The Termite :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 00:21
galmoid wrote:
0.4.7c
Some cleanup items (I think). Some errors show up in the FF
javascript console.
(...)

Those are definitively cleanup item. They are in place only to apply for IE (except the fontfamilly typo). It will probab;y be a good idea to create a mapmodule.css and a mapmodule-BROWSER.css (for BROWSER specific fixes)

galmoid wrote:
I don't understand this; but, here ya go...
The only references to z-index I can find are in ShowMap.tpl
Error: Error in parsing value for property 'z-index'.
Declaration dropped.
Source File: gallery/main.php?g2_view=map.ShowMap
Line: 0

This is in the theme I think. But it's possible that some z-index values are calculated and failed. I'll take a look at that.

Thanks!

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 00:57
Termitenshort wrote:
Just a quick note. With the problem related to slashes. did anyone try stripslashes
?

It would seem like an easy way if it works :)
-------------------------
The Termite :-)

Termite,
What about what I mentioned above? If those lines can be
changed then I think a band-aid (stripslashes) wouldn't
be a good idea? Thoughts anybody?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 01:09
galmoid wrote:
Quote:
Just a quick note. With the problem related to slashes. did anyone try stripslashes ?

It would seem like an easy way if it works :)
-------------------------
The Termite :-)

Termite,
What about what I mentioned above? If those lines can be
changed then I think a band-aid (stripslashes) wouldn't
be a good idea? Thoughts anybody?

band-aid ? it's a built-in function to PHP to remove slashes... I'm not sure it can be called a band-aid ;)

I think using a prreg instead is a band-aid :). In fact we can also do a test on the magic_quote being ON or OFF and then do the stripslashes only when needed.

What you have proposed would work as well, I'm just in the "cleaning" mode and I realized we have reinvented the wheel many times :-)

I'll just give it a shot and see what happen :)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 01:15

Ok, I gave a shot to the "band-aid" :-) and the following just works fine it seems:

            $pointHash[$entity->_id]['title']= stripslashes($entity->_title);
            $pointHash[$entity->_id]['summary']= stripslashes($entity->_summary);
            $pointHash[$entity->_id]['description']= stripslashes($entity->_description);

Any objection as to use this instead ? (i'm not sure why a preg was used in the first place ??)

let me know

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 01:29
Termitenshort wrote:
Quote:
Termite,
What about what I mentioned above? If those lines can be
changed then I think a band-aid (stripslashes) wouldn't
be a good idea? Thoughts anybody?

band-aid ? it's a built-in function to PHP to remove slashes... I'm not sure it can be called a band-aid ;)

I think using a prreg instead is a band-aid :). In fact we can also do a test on the magic_quote being ON or OFF and then do the stripslashes only when needed.

What you have proposed would work as well, I'm just in the "cleaning" mode and I realized we have reinvented the wheel many times :-)

I'll just give it a shot and see what happen :)

Actually I look a little closer and it seems that the slashes where just added on purpose ??? I'm still not to sure why at this point but it doesn't seem to be needed at all. The rest of the preg removes \n and \r ...

-> this also means that galmoid fix is best until the next step :)

The next step is to create a function to cleanup any text we want to display. I'm starting to write a class MapModuleUtils::Functions ... I think it will need to be put there.

See you soon

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 01:42

Bottom line is:

Here you go. Version 0.4.7d:

Includes fixes for transparency (thx floridave)
Includes fixes for apostrophes (thx galmoid)
Includes fix for new install (No currentVersion)

Small changes but bigger ones are to come soon ;-)

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

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 02:18
Termitenshort wrote:
band-aid ? it's a built-in function to PHP to remove slashes... I'm not sure it can be called a band-aid ;)

Built in . . . I know; but, in this case a band-aid (put in
at some point in the past, maybe before the pipe to
escape:"javascript"?.

Sorry man, didn't mean to get your dander up. ;-) :-)

By the way, I was able to remove the line I added to my
.htaccess file awhile back that turns off magic_quotes_gpc.
So magic_quotes_gpc is back to on with no ill effects. :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 02:33
galmoid wrote:
Sorry man, didn't mean to get your dander up. ;-) :-)

lol, no dander up :-D

galmoid wrote:
By the way, I was able to remove the line I added to my
.htaccess file awhile back that turns off magic_quotes_gpc.
So magic_quotes_gpc is back to on with no ill effects. :-)

Sweet. so I guess we will keep it as it is. version 0.4.7d is the version to start from. I totally forgot I had started the "GROUP" feature. So i will finish it because there is not a lot to do and then start the cleanup.

The next version will be 0.5.0 and I will also start the writing of a "dev" guide so that people know about all of the functions created and also how the module work in the coding details. it's easier to get more code added.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 02:42

Termite (and others),
No comments regarding my question about an update to the 'g' infowindows I'm working on?
Pretty please? If nobody has anything to say then I'll just put them
up here. I'll also ask that a change (very minor) be made to MapHeader.tpl
to go along with them. The change to MapHeader.tpl will be just to remove
a restriction that now exists on the summary and descriptions which will no
longer be necessary.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Thu, 2006-01-05 04:50
galmoid wrote:
Termite (and others),
No comments regarding my question about an update to the 'g' infowindows I'm working on?
Pretty please? If nobody has anything to say then I'll just put them
up here. I'll also ask that a change (very minor) be made to MapHeader.tpl
to go along with them. The change to MapHeader.tpl will be just to remove
a restriction that now exists on the summary and descriptions which will no
longer be necessary.

Yes, I'm all for this! I was also thinking of an optional (via Admin panel) defined link that would display in the infowindow. For example, image of a place (mountain, lake, attraction, etc.) at say a national park. The infowindow could have a link to that national park or whatever the case may be. The link should spawn a new browser window.

Make it so the link displayed does not need to be the http:// (in case of really long urls). The admin panel for this option would have TWO text boxes to fill out -- the URL and the text you want to have displayed. Probably other methods of doing this, I'm just thinking out loud here. Make sense or have I confused you?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2006-01-05 05:16
galmoid wrote:
Regarding an update to the 'g' infowindows . . .

Does anybody have any opinion regarding putting some
"value added"(? :-)) links in them? I am thinking
about:
---
Location:
-105.63624,35.9744
View location at Terraserver
(Unfortunately, USA only)
View Localtion at TopoZone
(Unfortunately, USA only)
WeatherBonk.com this location

Zoom In
---
'Location' is already in them and 'Zoom In' is
configurable in -all- infowindows through admin.

What do you think? Any other links? Maybe they could be added
to the admin screen (like Zoom In)? Maybe it is not at all a good
idea?

I know floridave has been looking into the weather thing.

I think the more info windows the better. Then the user has the option to use them or not. If the options are well documented then the user can remove what he/she does not want.

Now that Termite is back on-line (welcome back and Happy New Year!) I will be adding a config option to the info windows next to the "zoom-in" you will be able to configure a "zoom-out" as well. I will place a zoom-out link next to the zoom in link in the info window.
Does the users/admins want a 'return to zoom' on the map or just next to the zoom-in on the info window?

I have spent a lot of time with Google searching for a way to get weather from a lat/long pair and is not very easy. All the free weather services use a place name or post/zip code. That is OK for the US and Canada: I have found a couple of sites to convert a lat/long to give you post/zip code and then we can pass that to the weather service. This will take a lot of effort and I don't know if it is worth it just for North America?
I would like this to be automatic with the lat/long pair and not have to add a location name in addition to the lat/long pair for the photo.

I also looked at sunrise/sunset for the info window as well. This is relatively easy (I can get the sunrise/set for the lat/long in GMT but is that any good?) ....The Big issue is I can't find a place to give me the offset from GMT for the Lat/Long pair. With daylight savings time moving at various places in the world at different months it becomes a daunting task. One site had a DB for this info but was ONLY US$4,000! And it would be required to updated once again in 2008 when the US and Canada (and others) change daylight savings again to a earlier time.

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2006-01-05 05:25
galmoid wrote:
I don't understand this; but, here ya go...
The only references to z-index I can find are in ShowMap.tpl
Error: Error in parsing value for property 'z-index'.
Declaration dropped.
Source File: gallery/main.php?g2_view=map.ShowMap
Line: 0

Termitenshort wrote:
This is in the theme I think. But it's possible that some z-index values are calculated and failed. I'll take a look at that.

I added some z-index to the custom map controls. I am not sure if they are now needed or not. The map controls are just <div>s over the map and should render correctly without them. It might have been a left over from some other versions I had tried.
There should not be any calculated z-indexes that I know of for the custom controls.
Termite, Do you want me to look into that or have you got that under control?

Dave

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Thu, 2006-01-05 05:56
floridave wrote:
galmoid wrote:
Regarding an update to the 'g' infowindows . . .

Does anybody have any opinion regarding putting some
"value added"(? :-)) links in them? I am thinking
about:
---
Location:
-105.63624,35.9744
View location at Terraserver
(Unfortunately, USA only)
View Localtion at TopoZone
(Unfortunately, USA only)
WeatherBonk.com this location

Zoom In
---
'Location' is already in them and 'Zoom In' is
configurable in -all- infowindows through admin.

What do you think? Any other links? Maybe they could be added
to the admin screen (like Zoom In)? Maybe it is not at all a good
idea?

I know floridave has been looking into the weather thing.

floridave wrote:
I think the more info windows the better. Then the user has the option to use them or not. If the options are well documented then the user can remove what he/she does not want.

I like this idea/option alot!

floridave wrote:
Now that Termite is back on-line (welcome back and Happy New Year!) I will be adding a config option to the info windows next to the "zoom-in" you will be able to configure a "zoom-out" as well. I will place a zoom-out link next to the zoom in link in the info window.
Does the users/admins want a 'return to zoom' on the map or just next to the zoom-in on the info window?

Hmm, don't have a preference myself but my first thought is "next to the zoom-in on the info window."

floridave wrote:
I have spent a lot of time with Google searching for a way to get weather from a lat/long pair and is not very easy. All the free weather services use a place name or post/zip code. That is OK for the US and Canada: I have found a couple of sites to convert a lat/long to give you post/zip code and then we can pass that to the weather service. This will take a lot of effort and I don't know if it is worth it just for North America?

Given the amount of effort required just for NA my vote is no on this feature.

floridave wrote:
I would like this to be automatic with the lat/long pair and not have to add a location name in addition to the lat/long pair for the photo.

I also looked at sunrise/sunset for the info window as well. This is relatively easy (I can get the sunrise/set for the lat/long in GMT but is that any good?) ....The Big issue is I can't find a place to give me the offset from GMT for the Lat/Long pair. With daylight savings time moving at various places in the world at different months it becomes a daunting task. One site had a DB for this info but was ONLY US$4,000! And it would be required to updated once again in 2008 when the US and Canada (and others) change daylight savings again to a earlier time.

Dave

Yikes, $4K!! I don't think many folks (if any) would actually be interested in sunrise/set anyhow. And from what you described this could make the map-module a support nightmare. Would the possibility for users/Admins having an optional text box to input the zip code or weather ID code (for the image and/or album) make things easier instead of lat/long?

Actually from what I last read several months ago the DST will be extended by 4 weeks in the U.S. starting in 2007. This was signed into law by Pres Bush back in August. In Canada, only Ontario and Manitoba have announced plans to follow the U.S. change, though both Nova Scotia and Quebec are reportedly considering it. Don't know about other countries.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2006-01-05 06:17
swordfish wrote:
Would the possibility for users/Admins having an optional text box to input the zip code or weather ID code (for the image and/or album) make things easier instead of lat/long?

This is the option I am leaning too;
A text box where the user puts in the weather ID code ,
or zip/post code or the best bet is the airport code.
Then this would be a bit better to maintain and code as well.

@DST; I guess the rest of Canada will have to follow as well...
if they want to maintain some consistancy.

Dave

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 09:18
galmoid wrote:
Termite (and others),
No comments regarding my question about an update to the 'g' infowindows I'm working on?
Pretty please?

Well if it's a pretty please then :-). It's a good idea to do so but maybe just create new templates ?

I was also thinking to revisit the template feature.

I'm not too sure how exacly but i'd like to make it more user friendly and possibily more "Dynamic".

Maybe a good idea would be to have a "info window template generator" (like the markers) which would select a style (basic, table, tabbed) and then select which item to put in it (decription, title, date, thumbnail, links of any sort, weather, zoom-in map,...) and in wich order .

Well I'm just thinking out loud but it could be cool to have that capability. even thought everyone will create -one- and then use it.

Possibly we could improve it more and have the choice of a default one for album, a default one for pics (via the admin panel) and also leave the possibility of a specific one for each item. (via the item-edit)

It's not hard to do but that would involve a lot of rewritting so I'm keeping this on the pile for after the code cleanup :)

What do you think of my answer ? :):):):):)

galmoid wrote:
I'll also ask that a change (very minor) be made to MapHeader.tpl
to go along with them. The change to MapHeader.tpl will be just to remove
a restriction that now exists on the summary and descriptions which will no
longer be necessary.

No need to ask ;). Just make the change or post it here and I'll commit it on CVS :)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 09:41

Concerning the weather thing I would agree with the latest choices. A new box is no big deal and if the person does not want it or does not care, it would just be empty (which is fine).

We should use that option then as it will make everything easier :-)

floridave, I don't mind you look into the z-index issue as I still have some Internet issue it seems (it's hard for me to post a message ... 20-30 tries :()

I'll be working on the code cleanup and let you all know when I'm done (will take a few days I'm sure)

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 09:42

Concerning the weather thing I would agree with the latest choices. A new box is no big deal and if the person does not want it or does not care, it would just be empty (which is fine).

We should use that option then as it will make everything easier :-)

floridave, I don't mind you look into the z-index issue as I still have some Internet issue it seems (it's hard for me to post a message ... 20-30 tries :()

I'll be working on the code cleanup and let you all know when I'm done (will take a few days I'm sure)

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

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 15:05

I always believe that choice is a good thing; therefor, would vote for
the ability to have infowindow "value added" links configurable via
the admin screen (maybe the infowindow thing is growing towards it's
own admin tab?). An infowindow generator would really be ideal (I think
this may be beyond my pea brain though). It would make it unnecessary
to have many separate templates. I like Your idea Termite. :-)

I got to looking at the weather thing after floridave started (hoping
multiple research could come up with an answer) and found some free
ways to determine an airport code via coordinates; but, the whole
thing quickly became unwieldy. That is when I thought, just put in a link
to weatherbonk.

On the zoom in/zoom out thing: I vote for the zoom out to be available
"on the map" as well as next to the zoom in on the infowindow(s) (here
is an ideal example of the benefit of the generator - all of our
infowindows will require updating, separately, to accomodate the expanded
zoom capability).

I will post a new set of 'g' infowindows (I'll name them 'g2'...) for y'alls
inspection. I'll just leave the links I mentioned in place for the
moment. These templates will solve a several of problems I've found...
not the least of which is lonnng descriptions (try putting a lonnng
description on one of your images and see what I mean :-)).

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 15:21

On the Map Theme (not to be confused with the Map Module!)...
I believe that links around the Gallery site lead people to
-this- discussion. I ask Termite, did you take this over from
LarryDoliver? I have still not had a response to the PM him
I sent to him regarding some updating I have done with th theme.
swordfish, your earlier comment regarding a mass exodus :-) to
the theme from the module makes me think I should, maybe, just
leave well enough alone ;-). What should I do?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-01-05 16:21
galmoid wrote:
On the Map Theme (not to be confused with the Map Module!)...
I believe that links around the Gallery site lead people to
-this- discussion. I ask Termite, did you take this over from
LarryDoliver?
I have still not had a response to the PM him
I sent to him regarding some updating I have done with th theme.

No i didn't really take it over, but as for infos, he actually created this theme to answer the original need (marry google map + gallery) and then kinda left the them tail off when the module got started.

I started adding some things on the module and after seeing that no-one else was willing at the time. I just took it over :-)

I would suggest you do the same with the theme for the time being. Just create a new version 1.0.4 and everything is fine. version 1.0.3 was already created by me to fix a couple of bugs :)

galmoid wrote:
swordfish, your earlier comment regarding a mass exodus :-) to
the theme from the module makes me think I should, maybe, just
leave well enough alone ;-). What should I do?

Well that's a very valid discussion. eventually the module would have the picture stip (I already have the idea on how to make it:):):)) With the combination of the Album filtering and the rewrite module, it would be possible very easily to make the module behave the same way the theme does.

So my guess is eventually the theme will not be usefull unless there is some roadblock along the way.

For the time being the work you've done is great on the theme and you should just simply create a version 1.0.4 and update the wiki pages to reflect the new version.

that's only my opinion thought :)

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Thu, 2006-01-05 19:49
Termitenshort wrote:
[galmoid]I have still not had a response to the PM him
I sent to him regarding some updating I have done with th theme.[/galmoid]
...
I would suggest you do the same with the theme for the time being. Just create a new version 1.0.4 and everything is fine. version 1.0.3 was already created by me to fix a couple of bugs :)

So that settles it then... Even with the holidays, the week since you tried to contact Larry should be enough. (in my opinion, this is why things work best with TEAMS).

I look forward to your improvements Galmoid!! Have you put together a sample gallery with your version 1.04 yet? If so what is the URL so we can see the difference between it and 1.03c, if not, we could always use mine!

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 21:23

Map Theme 1.0.4 (not to be confused with the Map Module!)

Here it is . . . 1.0.4

I have created the zipfile to include the directory structure 'themes/map'.
The zipfile should be placed in your top level gallery directory (where
you would see the 'themes' directory) and unzipped from there. I did this
intentionally to try and avoid a possible mishap of unzipping it in the
modules directory and, well, you know.

If you already have installed aprevious version of the map theme (not to
be confused with the Map Module!) then I would rename that directory and
move it up one directory out of the themes directory. Then unzip 1.0.4.

Make sure you go through the map theme admin/setup screen in site admin/themes
and see what is there (more options!). For instance, you can place the pic
bar on top of the map, below, right or left.

There are even tooltips that will show up when you hover over a pic -or-
a marker. The tooltips will display the summary, if turned on and available,
or revert to the pic title otherwise.

The infowindows are, I think, a thing of beauty.

No doubt, it works for me; but I dread let you all lose on it. :-)
Please try it out and let me know what you think.

P.S. The files are a mix of unix and windows. If on windows use wordpad
and not notepad (notepad will run the lines together).

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2006-01-05 21:50
galmoid wrote:
Map Theme 1.0.4 (not to be confused with the Map Module!)

Here it is . . . 1.0.4

Thanks for steping up to the plate. The beauty of open source is that even if a project is not finished ...... it still can be.

I will try the theme this weekend. I like both, to be honest.

Dave

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-01-05 22:24

Here are the new 'g' infowindow templates. They contain the links that
were mentioned previously (as well as other good (I hope) things).

I ask that the following changes be made to MapHeader.tpl (these are
not necessary for the 'g' templates to work; but, they remove some
unnecessary restrictions (truncation) on the summary and description
fields).

line 416:

416             {if $map.showItemSummaries && !empty($point.summary)} "{$point.summary|markup|entitytruncate:256|replace:"href":" target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

change to:

           {if $map.showItemSummaries && !empty($point.summary)} "{$point.summary|markup|replace:"href":"target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

line 422:

422             {if $map.showItemDescriptions && !empty($point.description)} "{$point.description|markup|entitytruncate:256|replace:"href":"target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

change to:

           {if $map.showItemDescriptions && !empty($point.description)} "{$point.description|markup|replace:"href":"target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

line 434:

434             {if $map.showItemSummaries && !empty($point.summary)} "{$point.summary|markup|entitytruncate:256|replace:"href":" target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

change to:

           {if $map.showItemSummaries && !empty($point.summary)} "{$point.summary|markup|replace:"href":"target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

line 440:

440             {if $map.showItemDescriptions && !empty($point.description)} "{$point.description|markup|entitytruncate:256|replace:"href":"target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

change to:

           {if $map.showItemDescriptions && !empty($point.description)} "{$point.description|markup|replace:"href":"target='gpop' onClick=\"window.open(href, 'gpop','left=20,top=20,scrollbars=yes').focus();return false;\" href"|escape:"javascript"}"{else}""{/if}

Please let me know what you all think.

 
t001z
t001z's picture

Joined: 2005-12-29
Posts: 21
Posted: Thu, 2006-01-05 23:03
galmoid wrote:
Map Theme 1.0.4 (not to be confused with the Map Module!)
No doubt, it works for me; but I dread let you all lose on it. :-)
Please try it out and let me know what you think.

Galmoid, excellent work my friend!! As I knew you would do :)

One "bug" I think I found, when you have a hyperlink in the summary (or description too, maybe), it will give you broken hyperlink/text in the row of images at the top of the map (see mine to understand better). Off to class but I will check back later and to look at code and see if I can find where it is calling URL and possibly problem.

Other than that, I love it !!!!

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-01-06 00:12
t001z wrote:
One "bug" I think I found...

Please let me know when I can gain access, again.
I'll have a look; but, it looks like you may have
a/some typo(s) regarding the link (Of course, it
would not be the first time I have been incorrect).
I think it is also causing the horizontal scrollbar
to appear. I tried to taylor the settings to prevent
that from happening.

By the way, you -can- now use apostrophes (I think).

Glad you like it.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2006-01-06 01:13
galmoid wrote:
Here are the new 'g' infowindow templates. They contain the links that
were mentioned previously (as well as other good (I hope) things).

I ask that the following changes be made to MapHeader.tpl (these are
not necessary for the 'g' templates to work; but, they remove some
unnecessary restrictions (truncation) on the summary and description
fields).

(...)

Please let me know what you all think.

Well since I don't know what the truncate thing was for, sure :)

If anyonw knows why there was a truncate 256, just let us know, for the time being it's gone :)

thx galmoid

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2006-01-06 01:24
galmoid wrote:
Here are the new 'g' infowindow templates. They contain the links that
were mentioned previously (as well as other good (I hope) things).

I hope you don't mind but instead of overwriting the old ones I simply renamed them g2tabbed, etc ...

I think it's nice to give the option whether to use the new ones or not :)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-01-06 01:31
Termitenshort wrote:
If anyonw knows why there was a truncate 256, just let us know, for the time being it's gone :)

It truncates the text piped to it to 256 characters.
-In the case of a summary it would probably never be used.
I think summaries are truncated to less than that elsewhere
(I think not even having anything to do with the module).
-In the case of a description it would indeed truncate a long
text to 256 and put a few dots at the end.

I expect this was there in an attempt to keep infowindows
from getting too large or text from being written outside of
the infowindow. With the new 'g' templates text can be much
more than 256 (I don't know how much) since they have
vertical scrollbars. Anyway, if you were to put even 256
characters in a description the infowindows looked very bad
(at least for me :-)).

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-01-06 01:37
Termitenshort wrote:
I hope you don't mind but instead of overwriting the old ones I simply renamed them g2tabbed, etc ...

I think it's nice to give the option whether to use the new ones or not :)

Funny, that is what I did at first; but, before I posted the
zipfile I realized that more changes to MapHeader.tpl would
be required. Remember, there are several tests (if statements)
that check for 'gtabbed, gtable, gdefault, gcentered'
MapWindowType and new 'g2' names would need to be included in
these tests.
I leave the decisions to You.