Google Maps + Gallery

floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-11-03 23:03
FOBioPatel wrote:
(I suspected this had something to do with my register-globals being OFF, but since {$map.gallerybase} works - I know this is not it.)

I think your markers are not being created. I bet it is ImageMagik issue. It needs to see the markes to populate other thinks like the size (a few lines down).

Dave

 
amentges

Joined: 2005-11-02
Posts: 25
Posted: Thu, 2005-11-03 23:12

Does anyone have a clue why this module isn't working right witht he wordpress implementation?

http://mentges.net/wp-gallery2.php?g2_view=map.ShowMap

Gives IE errors and closes, yet works in firefox, I have seen this occur on quite a few others peoples sites also. Anyone have an idea on how to fix this?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-11-03 23:43

IE is unforgiving in that the javascript must NOT reside inside a <div> The wp-g2 integration wraps everything in a <div> first:

<body>
<div id="farouter">
<div id="outer">
<div id="rap">
<div id="masthead">

It is a know issue and is being worked on. But the fix, I suspect, will require a code changes to the intergation API and this module as well as ozgreg's WPG2 code as well.

Dave

____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
amentges

Joined: 2005-11-02
Posts: 25
Posted: Fri, 2005-11-04 00:04

Thank you very much for the detailed and informed response, I will await the fix.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-04 00:21
gilrim wrote:
hmm... think my problem is that I've been upgrading from the theme version to the module based one after. thus, I've got the GPS field defined as a photo field, whilst it probably shold've been a common field.. Changed type to Common, and it now appeares on all items :)

I will add a check for the existance of the field and move it to "common" if it already exist

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-04 00:22
swordfish wrote:
Your map page displays just fine in Firefox. So you have the same issue as I did even though I'm using WordPress. I'm not familar with Postnuke but I'm betting the same (or similar) fix I use would work for you. For the latest map-module here's what I had to do in order for the map to display in IE:

Edit ShowMap.tpl and after line 26 add these closing tags,
</div>
</td>
</tr>
</table>

AND at the very end

</div>
</td>
</tr>
</table>
<!-- #gsContent -->

Let me know if this works or not.

Is this something that I would need to add in the module itself or would it mess up everybody else ?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-04 00:38
Termitenshort wrote:
Is this something that I would need to add in the module itself or would it mess up everybody else ?

Nevermind, I just tried it and it worked fine on FF/IE without embedded mode and also with. :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-04 00:46
FOBioPatel wrote:
i wish this module was checked in to CVS on sourceforge, and then followed the nightly builds based approach used in developing gallery. then we can all move forward with the same version, this is going to stop a lot of people from falling behind and then asking for support on old versions. thoughts?

It's in the works and I should have something up and running sometime this week-end (hopefully) I've just been lazy and out of town :D

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-04 00:50
FOBioPatel wrote:
Even though mine was a fresh 3.0.2 installation, using the 3.0.1 ShowMap.tpl was a successful endeavor for me. It still did not read the name of my 'Marker' as in the above post. I had to remove the variable and enter it manually. I'm very amused right now, looking forward to the newer versions!

I think there is something not usual about your installation that the module cannot handle. I would need to know more details about your gallery2 install and Web install to try to troubleshoot ...

It seems that ga;;ery does not even know that there is ShowMap view, when I go to your link it's showing me an empty page with no source code at all ....

Unless I'm missing something it soesn't seem right.

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

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-11-04 02:23
floridave wrote:
swordfish wrote:
Ah, I see how the position is controlled now. Oh, what a pain this is going to be as I'll have to experiment in changing each and every padleft/top. Do you know of a simple way to get the icon positions centered correctly?

floridave wrote:
I did not have to redo them:
http://gallery2.ca/wordpress/wp-gallery2.php?g2_view=map:ShowMap

Like I said it _should_ position relitive the the map <div>
It does not work in IE but FF works.

Dave

I checked out your map and now I see. Mine is similar but I also have the G2 sidebar displayed so maybe thats what is messing up the alignment and or as you noted something to do with the <div>. Not a big deal though as I managed to fix mine by plugging in different positions. BTW, thanks for contributing the controls/icons.

Sidenote: I noticed your map url reads map:ShowMap instead of map.ShowMap. I thought G2 deprecated the ":" in favor of the (.) period.

 
amentges

Joined: 2005-11-02
Posts: 25
Posted: Fri, 2005-11-04 04:24

I tried the fix mentioned above and mine still errors out.

http://mentges.net/wp-gallery2.php?g2_view=map.ShowMap

;/

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-11-04 04:33
swordfish wrote:
I checked out your map and now I see. Mine is similar but I also have the G2 sidebar displayed so maybe thats what is messing up the alignment and or as you noted something to do with the <div>. Not a big deal though as I managed to fix mine by plugging in different positions. BTW, thanks for contributing the controls/icons.

Sidenote: I noticed your map url reads map:ShowMap instead of map.ShowMap. I thought G2 deprecated the ":" in favor of the (.) period.

I changed the main theme to Matrix and is still did not shift the map controls off the map <div>. I don't know what to say other than can you send me (PM) your url and I will look. Look at the same URL as before (i did not change the map size to fit the matrix layout)

As for the dot or colon ( . : ) both seem to work for me. Perhaps is it a layover from old upgrades?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-11-04 04:37
amentges wrote:
I tried the fix mentioned above and mine still errors out.

http://mentges.net/wp-gallery2.php?g2_view=map.ShowMap

;/

There is no fix for IE and embedded in wordpress yet:

floridave wrote:
IE is unforgiving in that the javascript must NOT reside inside a <div> The wp-g2 integration wraps everything in a <div> first:

<body>
<div id="farouter">
<div id="outer">
<div id="rap">
<div id="masthead">

It is a know issue and is being worked on. But the fix, I suspect, will require a code changes to the intergation API and this module as well as ozgreg's WPG2 code as well.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-11-04 06:14
amentges wrote:
I tried the fix mentioned above and mine still errors out.

http://mentges.net/wp-gallery2.php?g2_view=map.ShowMap

;/

Viewing your source I see:

        <div id="map" class="gbBlock" style="width: 600px; height: 400px; color:black;">
    
    </div>
    </div><!-- #gsContent -->
    </td>
  </tr>
</table>
      
      <div id="gsFooter">

And mine shows:

<div id="map" class="gbBlock" style="width: 740px; height: 600px; color:black;">
            </div>
    </td>
    </tr>
    </table>   

    </div>
    </td>
    </tr>
    </table> 
<!-- #gsContent -->
    </td>
  </tr>
</table>
      
      <div id="gsFooter">

Note that this is a workaround that works for me but is not an actual Fix.
Look over your ShowMap.tpl.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-11-04 06:36
floridave wrote:
swordfish wrote:
I checked out your map and now I see. Mine is similar but I also have the G2 sidebar displayed so maybe thats what is messing up the alignment and or as you noted something to do with the <div>. Not a big deal though as I managed to fix mine by plugging in different positions. BTW, thanks for contributing the controls/icons.

Sidenote: I noticed your map url reads map:ShowMap instead of map.ShowMap. I thought G2 deprecated the ":" in favor of the (.) period.

Quote:
I changed the main theme to Matrix and is still did not shift the map controls off the map <div>. I don't know what to say other than can you send me (PM) your url and I will look. Look at the same URL as before (i did not change the map size to fit the matrix layout)

As for the dot or colon ( . : ) both seem to work for me. Perhaps is it a layover from old upgrades?

Think I have some <div> or css issues. I'll look over my site some more. Might be the WP theme I'm using.

 
FOBioPatel
FOBioPatel's picture

Joined: 2004-07-25
Posts: 26
Posted: Fri, 2005-11-04 16:21

I managed to resolve my gallery woes.
I rechecked in gallery2 via cvs, reinstalled, and used the newest module and the subsequent updated showmap.inc and showmap.tpl files. massive thanks to everyone who helped!

for all to see:
http://www.fobiopatel.com/gallery/map.php

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2005-11-05 03:56

My map works in Firefox but I get "Operation Aborted" errors in IE!
This appears to be a common fault for many folks (it's asked almost daily on the Google Groups Map forum) with embedded G2 sites (such as myself) as well as other sites not even using G2.
From the Mapki FAQ:
These errors are produced in IE when the javascript tries to change the page before it has completed rendering. There are 3 common ways to solve this problem:

1. move all the javascript to the <head> of the document and call a makeMap() function which initializes the Google Map in the onload handler (in the <body> tag, <body onload="makeMap();">). The onload handler is executed after the page finishes loading.

2. put all the javascript at the end of the <body> (just before the </body> tag)

3. a variation of #1, use a setTimeout to delay the processing of the map code until the page has finished rendering.

Now perhaps someone here could come up with a solution for the map-module that works for G2 embedded sites and no ill effects for G2 standalone. My hack mentioned in a recent post works however, it messes up Floridave's icon controls alignment.
Also, the same or some alternative solution is required for the GPSMap.tpl file.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sat, 2005-11-05 04:47
swordfish wrote:
My map works in Firefox but I get "Operation Aborted" errors in IE!
This appears to be a common fault for many folks (it's asked almost daily on the Google Groups Map forum) with embedded G2 sites (such as myself) as well as other sites not even using G2.
From the Mapki FAQ:
These errors are produced in IE when the javascript tries to change the page before it has completed rendering. There are 3 common ways to solve this problem:

1. move all the javascript to the <head> of the document and call a makeMap() function which initializes the Google Map in the onload handler (in the <body> tag, <body onload="makeMap();">). The onload handler is executed after the page finishes loading.

2. put all the javascript at the end of the <body> (just before the </body> tag)

3. a variation of #1, use a setTimeout to delay the processing of the map code until the page has finished rendering.

Now perhaps someone here could come up with a solution for the map-module that works for G2 embedded sites and no ill effects for G2 standalone. My hack mentioned in a recent post works however, it messes up Floridave's icon controls alignment.
Also, the same or some alternative solution is required for the GPSMap.tpl file.

Option 2 seems the less disruptive for everybody :) I'm gonna switch the content around and check it out ...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-11-05 13:34

1. would work with embedded g2!
put js into <head> is easy in G2. but adding to <body attributes isn't / is impossible without theme.tpl modifcations, but there's an elegant workaround!.
adding stuff to <head>:
- if it's for a View, then call $template->head('modules/moduleName/templates/Header.tpl'); in your loadTemplate function
- if it's for a block, call $template->head(...) in your Preload.inc class

body onload:
see workaround:
http://gallery.menalto.com/node/19392

2. does work in G2 standalone, since we have the addtotrailer / trailer methods.
but it won't work in embedded g2, since we can't guarantee that the end of G2's HTML output is at the end of the page (or is that no requirement for this method)?

3. adding a timeout? seems to be a nasty hack...

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sat, 2005-11-05 15:39
valiant wrote:
1. would work with embedded g2!
put js into <head> is easy in G2. but adding to <body attributes isn't / is impossible without theme.tpl modifcations, but there's an elegant workaround!.
adding stuff to <head>:
- if it's for a View, then call $template->head('modules/moduleName/templates/Header.tpl'); in your loadTemplate function
- if it's for a block, call $template->head(...) in your Preload.inc class

body onload:
see workaround:
http://gallery.menalto.com/node/19392

2. does work in G2 standalone, since we have the addtotrailer / trailer methods.
but it won't work in embedded g2, since we can't guarantee that the end of G2's HTML output is at the end of the page (or is that no requirement for this method)?

3. adding a timeout? seems to be a nasty hack...

Thanks for the input, option 1 it is then ! :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sat, 2005-11-05 16:05

Like promised,

I have setup a Version Control tool so that we can collaborate easier on this module.

it using subversion that seems to be a bit better than CVS. It can be found at svn://perso.mine.nu/Gmap it's accessible to anyonw for read, if you want to add code to it you will need an account (PM me for that)

To get the code you can use TortoidseSVN, ViewCVS, RapideSVN, etc ....

I will still upload some releases here, but it's easier to have a repository

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

 
ninjainvasion
ninjainvasion's picture

Joined: 2005-11-05
Posts: 78
Posted: Sat, 2005-11-05 20:03

Marker creation failure

Hi,

I found this thread two days ago, and after reading through most of the messages, I wanted to give it a try. So I downloaded and installed map-module-0.3.2b.zip. Everything went fine (installation, module activation, base settings) until I tried to create the markers. After entering my marker settings when I hit the button to create the markers, there was a HTTP 500 (Internal Server Error), no specific PHP error which I get usually. Checking the map/images directory, it didn't create anything (only an empty.gif is there).

Now the weird thing, since then every time I click on the 'Google Map' tab in the Site Admin I get this error again, so I can't even get back to the main settings. I tried different things - Maintenance -> empty database/template cache, uninstall/reinstall the module, delete the map module folder from the server and install it again - I always get this error message now as soon as I click on 'Google Map'. As it happened first when I tried to create the markers, I thought it could be an ImageMagick issue. But the site admin tells me that I have ImageMagick 6.1.9 and that everything is fine with it.

My gallery is a multisite installation and I was trying to install the map module in the main gallery (the one that contains all the code). Here is my configuration:

Gallery version = 2.0.1 core 1.0.0.1
PHP version = 4.4.0 cgi
Webserver = Apache
Database = mysqlt 4.0.25-standard
Toolkits = ArchiveUpload, Exif, Thumbnail, Gd, NetPBM, SquareThumb, ImageMagick
Operating system = Linux pi 2.4.31 #1 SMP Tue Aug 16 12:52:11 CEST 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.12) Gecko/20050919 Firefox/1.0.7

I really have no clue even where to start looking for an error...

Thanks for any help
Luzian

------
Stay tuned for the Ninja Invasion

 
ninjainvasion
ninjainvasion's picture

Joined: 2005-11-05
Posts: 78
Posted: Sat, 2005-11-05 21:54
ninjainvasion wrote:
Marker creation failure

Checking the map/images directory, it didn't create anything (only an empty.gif is there).

Oops, actually looking in the gallery/images/map directory, it has created the marker images as I specified there, and it does show the map with markers and everything - I just can't get back to the Google Map page in the site admin - always get the HTTP 500 error.

Any ideas?

------
Stay tuned for the Ninja Invasion

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2005-11-05 22:08
Termitenshort wrote:
Like promised,

I have setup a Version Control tool so that we can collaborate easier on this module.

it using subversion that seems to be a bit better than CVS. It can be found at svn://perso.mine.nu/Gmap it's accessible to anyonw for read, if you want to add code to it you will need an account (PM me for that)

To get the code you can use TortoidseSVN, ViewCVS, RapideSVN, etc ....

I will still upload some releases here, but it's easier to have a repository

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

Cool!
$ svn co svn://perso.mine.nu/Gmap Gmap
Checked out revision 3.
Works for me.

Thanks!

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2005-11-05 22:15
ninjainvasion wrote:
ninjainvasion wrote:
Marker creation failure

Checking the map/images directory, it didn't create anything (only an empty.gif is there).

Oops, actually looking in the gallery/images/map directory, it has created the marker images as I specified there, and it does show the map with markers and everything - I just can't get back to the Google Map page in the site admin - always get the HTTP 500 error.

Any ideas?

------
Stay tuned for the Ninja Invasion

Something unexpected has occured. What does your Apache error.log have to say?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sat, 2005-11-05 22:23
ninjainvasion wrote:
Marker creation failure

Hi,

I found this thread two days ago, and after reading through most of the messages, I wanted to give it a try. So I downloaded and installed map-module-0.3.2b.zip. Everything went fine (installation, module activation, base settings) until I tried to create the markers. After entering my marker settings when I hit the button to create the markers, there was a HTTP 500 (Internal Server Error), no specific PHP error which I get usually. Checking the map/images directory, it didn't create anything (only an empty.gif is there).

Now the weird thing, since then every time I click on the 'Google Map' tab in the Site Admin I get this error again, so I can't even get back to the main settings. I tried different things - Maintenance -> empty database/template cache, uninstall/reinstall the module, delete the map module folder from the server and install it again - I always get this error message now as soon as I click on 'Google Map'. As it happened first when I tried to create the markers, I thought it could be an ImageMagick issue. But the site admin tells me that I have ImageMagick 6.1.9 and that everything is fine with it.

My gallery is a multisite installation and I was trying to install the map module in the main gallery (the one that contains all the code). Here is my configuration:

Gallery version = 2.0.1 core 1.0.0.1
PHP version = 4.4.0 cgi
Webserver = Apache
Database = mysqlt 4.0.25-standard
Toolkits = ArchiveUpload, Exif, Thumbnail, Gd, NetPBM, SquareThumb, ImageMagick
Operating system = Linux pi 2.4.31 #1 SMP Tue Aug 16 12:52:11 CEST 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.12) Gecko/20050919 Firefox/1.0.7

I really have no clue even where to start looking for an error...

Thanks for any help
Luzian

------
Stay tuned for the Ninja Invasion

Did you check the server log when you are clicking on the link to see what's the error ? It could be a permission error or something of the sort.

Let us know
--------------------
The Termite :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sat, 2005-11-05 22:24
Termitenshort wrote:
Like promised,

I have setup a Version Control tool so that we can collaborate easier on this module.

it using subversion that seems to be a bit better than CVS. It can be found at svn://perso.mine.nu/Gmap it's accessible to anyonw for read, if you want to add code to it you will need an account (PM me for that)

To get the code you can use TortoidseSVN, ViewCVS, RapideSVN, etc ....

I will still upload some releases here, but it's easier to have a repository

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

If you go to the SVN repository, you will find a "map" folder and a "gmap" folder, make sure you only take the "map" folder for now.

I'm trying something new that could be nice if I succeed ;)

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

 
ninjainvasion
ninjainvasion's picture

Joined: 2005-11-05
Posts: 78
Posted: Sat, 2005-11-05 23:32
swordfish wrote:
Something unexpected has occured. What does your Apache error.log have to say?

Termitenshort wrote:
Did you check the server log when you are clicking on the link to see what's the error ? It could be a permission error or something of the sort.

Unfortunately I have no access to the error.log on my server - I just wrote a mail to my provider to ask them for it. See if I get any news from them... but probably not before Monday.

------
Stay tuned for the Ninja Invasion

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-11-06 01:49

@versioning:
just for your information, we, the development team of g2, are amazed by this module and we'll want to integrate it in the official release in the next month(s).
so maybe your svn repository is useful now, but we'll add it then to a sf.net hosted cvs account... since all our stuff is in cvs.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-11-06 02:10

if you want access to use gallery-contrib on sf.net i'm sure we could set that up too.. but i agree with valiant, eventually this will be in main gallery cvs. cool stuff!

 
chrisvdb

Joined: 2005-10-29
Posts: 13
Posted: Sun, 2005-11-06 11:43
Termitenshort wrote:
Like promised,

I have setup a Version Control tool so that we can collaborate easier on this module.

it using subversion that seems to be a bit better than CVS. It can be found at svn://perso.mine.nu/Gmap it's accessible to anyonw for read, if you want to add code to it you will need an account (PM me for that)

To get the code you can use TortoidseSVN, ViewCVS, RapideSVN, etc ....

I will still upload some releases here, but it's easier to have a repository

Cool, and code repository will make things much easier!

I gave the svn repository a try, but always seem to get a timeout:
svn co svn://perso.mine.nu/Gmap map
svn: Can't connect to host 'perso.mine.nu': Connection timed out

Perhaps the gallery-contrib cvs wouldn't be a bad idea?

Cheers,
Chris.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-11-06 14:47
chrisvdb wrote:
I gave the svn repository a try, but always seem to get a timeout:
svn co svn://perso.mine.nu/Gmap map
svn: Can't connect to host 'perso.mine.nu': Connection timed out

Yep, my Desktop had died yesterday for some unexplicable reason so the SVN is just back up ... I was giving it a try before moving it on a real server ;) - Will be doing that soon

chrisvdb wrote:
Perhaps the gallery-contrib cvs wouldn't be a bad idea?

Now that would definitively be much better :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-11-06 14:52

I have been working on making this module NOT dependant of the CustomField module because it's possible some person do not want to run both (don't ask me why) ...

Anyways I think it's better if this module become a bit more standalone and doesn't rely on anything else but itself (we discussed about that already). So what I did is I basically merge the old map module (0.3.2) and the CustomField Module into one and made a new Table for the google map "custom fields".

The good new is that I works !! :) I have tried to uninstall my customfield module and all seems fine.

The bad news is that the informatino entered in the CustomFields from before needs to be transfered over.... if you have access to your DB it's easy, otherwise it can be a bit tricky ;-)

Anyways, I'm currently adding the ROUTE feature and when all is right I will make it available on the repository and here.

See you !

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

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-11-06 15:03
Quote:
I have been working on making this module NOT dependant of the CustomField module because it's possible some person do not want to run both (don't ask me why)

well, if it's a simple copy of the customfields module just to get rid of the dependency, then i'm against copying the code, but it's your call.
why? because of maintainability. we'd have to maintain the code for the customfields twice.
or are there other reasons?

@gallery-contrib:
please PM me or better bharat your sf.net account information such that he can add you to the gallery-contrib project. you'll then have permission to cvs to gallery-contrib.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-11-06 17:08
valiant wrote:
Quote:
I have been working on making this module NOT dependant of the CustomField module because it's possible some person do not want to run both (don't ask me why)

well, if it's a simple copy of the customfields module just to get rid of the dependency, then i'm against copying the code, but it's your call.
why? because of maintainability. we'd have to maintain the code for the customfields twice.
or are there other reasons?

@gallery-contrib:
please PM me or better bharat your sf.net account information such that he can add you to the gallery-contrib project. you'll then have permission to cvs to gallery-contrib.

It's more than a copy there was in the module a file CustomFieldItemEdit.tpl copied to the "local" directory of the templates for CustomField.

Also there is going to be some more changes to this file to add "EXIF GPS coordinate" and the such

It's easier at this point to get a trimmed version of the customfield module specific to the needs of this module :-)

I will send my info on sf.net to be added ;)

 
conorboyd

Joined: 2005-03-29
Posts: 166
Posted: Mon, 2005-11-07 00:17

Hi,

I'm still getting a blank map area when I try to view the map: http://gallery.ildica.com/main.php?g2_view=map.ShowMap

I've got GPS coords set on at least one of my albums and one of my images.

I've updated the ShowMap.tpl and ShowMap.inc files on top of the original 0.3.2b installation, but still no luck.

And this is the source for the page:
<!--
Create the Div where the map will be displayed
-->
<div id="map" class="gbBlock" style="width: 600px; height: 400px; color:black;">

</div>
</div><!-- #gsContent -->
</td>
</tr>
</table>

I've purged my template cache.

Anybody got any other suggestions?

Many thanks,

Conor

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Mon, 2005-11-07 00:25

conorboyd check if ure gps coordinates are entered correctly lon,lat... i accidentely entered 45N,45E and all that i got was blank map :( took me sometime till figured out what i got wrong, stupid ;)

termite...is there on the way some coordinate input checking?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 01:37
igrcic wrote:
termite...is there on the way some coordinate input checking?

There wasn't before today but I just found out of a bigger problem if you have no GPS coordinate anywher, you get error messages just about everywhere you ....

So yes there will be some more error checking added regarding GPS coordinate. especially now that I got rid of the dependance with CustomEditField it will make it even easier to do it :)

Stay tuned

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 01:43
conorboyd wrote:
Hi,

I'm still getting a blank map area when I try to view the map: http://gallery.ildica.com/main.php?g2_view=map.ShowMap

I've got GPS coords set on at least one of my albums and one of my images.

I've updated the ShowMap.tpl and ShowMap.inc files on top of the original 0.3.2b installation, but still no luck.

And this is the source for the page:
<!--
Create the Div where the map will be displayed
-->
<div id="map" class="gbBlock" style="width: 600px; height: 400px; color:black;">

</div>
</div><!-- #gsContent -->
</td>
</tr>
</table>

I've purged my template cache.

Anybody got any other suggestions?

Many thanks,

Conor

I looked at your code and there is a problem gathering the size of the marker which generate a javascript error. This is the reason why you don't see the map.

in order to fix it, open the ShowMap.inc and after line 241, the line looks like this:

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

Just add another line:

$Sizes = getimagesize($absolutegallerydir."images/map/".$map['useMarkerSet']."/".$file);

and also still in this file, after

$mydir->close(); }

Add:

$map['MarkerSizeX']=$Sizes[0];
$map['MarkerSizeY']=$Sizes[1];

It was a previsously released fix but I guess you didn't see it :-)

Let me know if it works, see you !

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

 
conorboyd

Joined: 2005-03-29
Posts: 166
Posted: Mon, 2005-11-07 03:08

Thanks all,

I have tried reading through all the posts, but it's sometimes difficult to separate the support-y type ones like my query from your techie dev type questions :-)

Will try updating the file as suggested.

Thanks again,

Conor

 
FOBioPatel
FOBioPatel's picture

Joined: 2004-07-25
Posts: 26
Posted: Mon, 2005-11-07 05:18

MONSTER BUG: if you move any albums around after you begin using the Google Maps Module, the Map will never load up until you move the albums back to their original locations. If anyone is being caused any grief from this, this is just a heads up. Do not move your albums around. If you did, and it stopped working, move them back.

Perhaps in a future release we can have a way for Google Maps to update whatever records it keeps, so moving albums around won't kill anything.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 05:26
FOBioPatel wrote:
MONSTER BUG: if you move any albums around after you begin using the Google Maps Module, the Map will never load up until you move the albums back to their original locations. If anyone is being caused any grief from this, this is just a heads up. Do not move your albums around. If you did, and it stopped working, move them back.

Perhaps in a future release we can have a way for Google Maps to update whatever records it keeps, so moving albums around won't kill anything.

I wonder what's causing that ....

 
conorboyd

Joined: 2005-03-29
Posts: 166
Posted: Mon, 2005-11-07 07:15

Termitenshort,

Yeah, I had that fix and I've re-checked Showmap.inc as well.

Mmmm, any other suggestions?

Thanks,

Conor

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Mon, 2005-11-07 07:32
Termitenshort wrote:
FOBioPatel wrote:
MONSTER BUG: if you move any albums around after you begin using the Google Maps Module, the Map will never load up until you move the albums back to their original locations. If anyone is being caused any grief from this, this is just a heads up. Do not move your albums around. If you did, and it stopped working, move them back.

Perhaps in a future release we can have a way for Google Maps to update whatever records it keeps, so moving albums around won't kill anything.

Quote:
I wonder what's causing that ....

I just moved an entire root album containing images linked to the map to an existing Album and had no problems. However, when moving the Album back to the original location, clicking a pushpin on the map to display the thumbnail, which it did display but clicking the thumbnail then produced below error.

Error (ERROR_MISSING_OBJECT) : Parent 8478 path map
in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 118 (gallerystatus::error) 
in modules/core/classes/GalleryCoreApi.class at line 1763 (galleryfilesystementityhelper_simple::fetchchildidbypathcomponent) 
in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 63 (gallerycoreapi::fetchchildidbypathcomponent) 
in modules/core/classes/GalleryCoreApi.class at line 1709 (galleryfilesystementityhelper_simple::fetchitemidbypath) 
in modules/core/classes/GalleryView.class at line 371 (gallerycoreapi::fetchitemidbypath) 
in modules/core/classes/GalleryView.class at line 246 (showitemview::_getitem) 
in main.php at line 335 (showitemview::doloadtemplate) 
in main.php at line 88
in modules/core/classes/GalleryEmbed.class at line 155
in /var/www/localhost/htdocs/blog/wp-gallery2.php at line 55 (galleryembed::handlerequest) 

I then clicked browser back button, refreshed the browser window, map reloaded, clicked on several pushpin/thumbnails and no errors occurred. Everything works fine now. Perhaps after you move album(s) linked to the map go delete template and database cache. It also may be a good idea to backup your G2 database before you start moving Albums around to avoid potential database corruption.

Also, if a user deletes an image linked to the map or an entire album then does the customfieldmap entries get automatically cleared out; otherwise does (should) the map-module perform checking and clean-up?
Thoughts?

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Mon, 2005-11-07 07:43
conorboyd wrote:
Termitenshort,

Yeah, I had that fix and I've re-checked Showmap.inc as well.

Mmmm, any other suggestions?

Thanks,

Conor

I can see your map but only the marker_shadow.png are displayed.
Are you sure your paths "/images/map/Conor/marker_ORANGE.png" and "/images/map/Conor/marker_default.png" are correct and the png files actually exist?

 
infinity005

Joined: 2003-11-11
Posts: 43
Posted: Mon, 2005-11-07 09:05

what is the google key suppose to be registered against? I tried about 10 differnt urls and nothing has worked.

from reading the threads, http://www.site.com/gallery should work!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-11-07 14:24
infinity005 wrote:
what is the google key suppose to be registered against? I tried about 10 differnt urls and nothing has worked.

from reading the threads, http://www.site.com/gallery should work!

Real urls would be helpfull. Did you try to make a html page with the example code that google gave you?
www.site.com is different than site.com as well as www.Site.com etc.

Dave

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 14:48

Just a quick thing, if anyone is tired of seeing the ugly icon in the admin page, I have created a google icon :-)

Just copy the enclosed file to the /gallery2/modules/icons/iconpacks/nameoftheiconpackyouuse/

Then you need to edit icons.css and icons-rtl.css located in the same folder:

In icons.css, add:

.gbLink-map_MapSiteAdmin {
  background: url(google.gif) left center no-repeat;
}

In icons-rtl.css, add:

.gbLink-map_MapSiteAdmin {
  background: url(google.gif) right center no-repeat;
}

Enjoy !

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 15:20

The subversion repository I've created will be taken down after today. Bharat was kind enought to make me part of the "gallery-contrib" deal on sf.net so I have uploaded the map version 0.4.0 so it is available for grab on
cvs.sourceforge.net
CVSROOT/gallery-contrib
modulename: gallery2/modules/map/

It's also available for download right here :-)

Here are the Changes:
Rewritten part of the module to make it independant of CustomField
Added some code for the Route Management (not finish yet)
Added a fix to prevent error when there is no GPS coordinate anywhere
Added numerous fixes since the last version found along the way :D

WARNING - WARNING !!! since the module does not rely on CustomField anymore, on the first installation you will see no markers anymore !!!
How to fix that:
1 - Export the content of the table called g2_customfieldmap to a file.
2 - Edit the file and replace any occurence of g2_customfieldmap by g2_mapmap
3 - Delete any entries not related to the map module (Entries that do NOT have GPS, COLORS or Zoomlevel in the second field are not related)
4 - Import the new file into the database (if the table already existed, you might get an error message)
5 - Done !!

If you get an error message at step 4, open the text file and delete the entire "CREATE TABLE" statement

One last thing ! If anyone will add code to this module, I suggest contacting bharat so your sf.net account can be added to the project :)

Enjoy !

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

 
jcampbell1

Joined: 2005-10-26
Posts: 8
Posted: Mon, 2005-11-07 17:02
valiant wrote:
well, if it's a simple copy of the customfields module just to get rid of the dependency, then i'm against copying the code, but it's your call.

Not to beat a dead horse, but I think breaking the dependancy on customfields is a good idea. I added a "get coordinate" link next to the input field to help find the coordinate by double clicking a location on the map. This required a nasty hack to the Custom Field module. Also, in the new module it will be very easy to say implement support for different coordinate systems, and just translate the input in php. My two cents.

In other news, I said I was working on an AutoZoom and Geocoder support. First, I have lowered the priority on the geocoder support, since most of my photos don't have an address specific location. If there is popular support for this, I can take another look. In terms of autozoom, I have a function that takes a set of coordinates and map size and returns the ideal zoom and center. At this point, it is not that useful, but may be handy if the module implements the plotting of only groups of points. I can share the code, when I return home from work.