Google Maps + Gallery

Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 20:50
jelwell wrote:
Termitenshort wrote:
Can we look at other alternative (if there is any ?) ?

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

Good luck finding an alternative free service. My guess is you'll have to wait for the Maps API wars to pick up a bit more. Mapquest, Yahoo and Google ought to be handing out more and more free features.

Not to deter you, but did you realize that even Google's Terms of Service require that you be "relatively NON-COMMERCIAL":

"1.4 Appropriate Conduct and Prohibited Uses. The Service may be used only for services that are generally accessible to consumers without charge."

Yahoo's terms of use: "The Yahoo! AJAX Maps API is limited to 50,000 queries per IP per day and to non-commercial use. "

SooooOooOo, I mean, if you're worried about integrating geocoding - because of it's non-commercial clause - then you should be worried about integrating Google maps or Yahoo Maps as well.

The dot com days are, mostly, over. They're not giving this stuff away for free anymore. You need PAID license to partner and user these Map APIs for commercial purposes.
Joseph Elwell.

I wasn't trying to upset anyone but rather make a comment so we make an inform decision on this :D. I understand that you have made some work on it and i'm sure everybody agree when I say we appreciate it very much.

Sorry if I offended you, there is many way to implement a feature, we just need to find the best one.

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 20:54

Nothing to do with the Map Module deal but if anyone is still using the Map Theme and is having the issue where it says that the key is invalid. I have found a solution for it:

Open Album.tpl in the template directory of the map theme and edit the line with the script source, replace it with:

<script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key={$theme.params.GoogleMapKey}" type="text/javascript"></script>

Problem is gone :)

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

 
jelwell

Joined: 2003-05-29
Posts: 115
Posted: Wed, 2005-11-09 21:06
Termitenshort wrote:
I wasn't trying to upset anyone but rather make a comment so we make an inform decision on this :D. I understand that you have made some work on it and i'm sure everybody agree when I say we appreciate it very much.

Sorry if I offended you, there is many way to implement a feature, we just need to find the best one.

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

I'm not offended. Furthermore I totally agree that a less limited license should be sought. I'm just pessimistic and I wanted to point out that your module is already very limited by Google's Map API license.

To be honest, I don't think this code could be included in Gallery since it's GPL and, while the code is open, Google's Terms of Service contradict the GPL.
Joseph Elwell.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 21:56

Just to avoid duplicate work on this module I want to annouce that jcampbell1 as made a function that will help for the AutoCenter/AutoZoom deal (I should get that all integrated tonight) also he's currently working on the EXIF data extraction/conversion to auto-import the infos in the GPS fiels.

I'm still finishing up the ROUTE feature and I think it will be in tonight's release :)

I've also gathered some small things here and there that I already added.

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

 
samkuhn2

Joined: 2004-04-13
Posts: 60
Posted: Wed, 2005-11-09 22:31
Quote:
Google's Terms of Service contradict the GPL

Can you be more specific about this statement? Perhaps quote the relevant parts of the Google Maps TOS and GPL license?

I found this short discussion in the Google Maps Api group, but it didn't really seem to answer the question.
http://groups.google.com/group/Google-Maps-API/browse_frm/thread/8bf09810ffa3f70c/fc81c04d1bbb9b76?tvc=1#fc81c04d1bbb9b76

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 23:14

Well i might have found a totally free alternative for the geocoding thing, let's wait and see ;)

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

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Wed, 2005-11-09 23:22
Termitenshort wrote:
Nothing to do with the Map Module deal but if anyone is still using the Map Theme and is having the issue where it says that the key is invalid. I have found a solution for it:

Open Album.tpl in the template directory of the map theme and edit the line with the script source, replace it with:

<script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key={$theme.params.GoogleMapKey}" type="text/javascript"></script>

Problem is gone :)

....not for me :( i tried to change it, and then delete it, I even tried to enter key there, but it doesnt work.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 23:36
igrcic wrote:
Termitenshort wrote:
Nothing to do with the Map Module deal but if anyone is still using the Map Theme and is having the issue where it says that the key is invalid. I have found a solution for it:

Open Album.tpl in the template directory of the map theme and edit the line with the script source, replace it with:

<script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key={$theme.params.GoogleMapKey}" type="text/javascript"></script>

Problem is gone :)

....not for me :( i tried to change it, and then delete it, I even tried to enter key there, but it doesnt work.

Can you do a "view source code" and copy/paste into a .txt file and post here ?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 23:42
Termitenshort wrote:
Well i might have found a totally free alternative for the geocoding thing, let's wait and see ;)

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

Got it to work :-)

I will be putting something in tonight's release. A field on each item where you can enter an address and it will find GPS coord for you :D

See you
------------------------
The termite :-)

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Thu, 2005-11-10 07:26

Will someone please help me!
I know my away around gallery1.
I decided to setup a gallery using 2.0 for my trip to Japan. I leave tommorow. The question is how do I set this up?

I downloaded the module and set it up but when I go into the configure all I get is a white screen. No options or anything.
Will someone please tell me to set it up step by step. I only have a few hours left to set it up.

Thanks!

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 07:39
tc1234 wrote:
Will someone please help me!
I know my away around gallery1.
I decided to setup a gallery using 2.0 for my trip to Japan. I leave tommorow. The question is how do I set this up?

I downloaded the module and set it up but when I go into the configure all I get is a white screen. No options or anything.
Will someone please tell me to set it up step by step. I only have a few hours left to set it up.

Thanks!

If you are getting a blank page on the Admin Panel, you basically didn't read the latest messages :-) Just kidding ... there was a message about that already.

Open the file MapSiteAdmin.inc and at the very end change the name of the template from mapSiteAdmin.tpl to MapSiteAdmin.tpl and then everything should be back to normal ;)

Cya

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Thu, 2005-11-10 07:53

Thank you for the fast reply termitenshort but it seems I still have a blank page.
I Opened the file MapSiteAdmin.inc and at the very end change the name of the template from mapSiteAdmin.tpl to MapSiteAdmin.tpl but it still has a blank screen. Should I uninstall the module and re-install?
I am using Version: 0.4.0

thank you so much for the help

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 07:57
tc1234 wrote:
Thank you for the fast reply termitenshort but it seems I still have a blank page.
I Opened the file MapSiteAdmin.inc and at the very end change the name of the template from mapSiteAdmin.tpl to MapSiteAdmin.tpl but it still has a blank screen. Should I uninstall the module and re-install?
I am using Version: 0.4.0

thank you so much for the help

You should use versino 0.4.0c and maybe try to delete the database & template cache. It usually helps a bit
Let me know

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Thu, 2005-11-10 08:06

termitenshort

Ya'll been movin so fast I can't keep up! The latest map-module I currently have installed is 0.3.2.
I'd like to catch up and install 0.4.0c and then perhaps try from cvs. Anyways in order for me to upgrade do I need to follow your latest instructions? Where you start off with,

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.
etc..

thanks!

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 08:18
swordfish wrote:
termitenshort

Ya'll been movin so fast I can't keep up! The latest map-module I currently have installed is 0.3.2.
I'd like to catch up and install 0.4.0c and then perhaps try from cvs. Anyways in order for me to upgrade do I need to follow your latest instructions? Where you start off with,

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.
etc..

thanks!

Yes you do otherwise you'll be a bit surprise not to see anymore markers on the map :) I'm going to upload the version 0.4.1 right this minute so maybe you can wait for it :-)

'soon

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 08:21

Well as I promised here is today's upload with some more changes to the module :-)

What's new
- Added the Route feature to draw polilynes between markers (album or pics)
- Added support for geocoding in the album/photo Edit (get via address link)
- Added a link to show the google map in the "ItemAction" block (thx nicroets)
- Added a link "get via map" for the Center of the map in the AdminPanel
- Added a AutoCenter&Zoom feature (thx Jcampbell1 for the code)
- Moved the "Control" settings to the theme tab (made more sense)
- Added a pre-created MarkerSet as a Zip file
- Added Error control for the GPS coordinate entry in the Albums/photos
- Fix the issue with 50% and 200% resizing of the markers

I've also updated the Wiki with the new Todo :-)

Enjoy !

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

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Thu, 2005-11-10 09:08

Hey termite thank you for the hard work
This may be a dumb question but how do I add markers and use pictures for the marker?

 
tlmothy

Joined: 2005-11-10
Posts: 41
Posted: Thu, 2005-11-10 10:12

Hey termite do you have any idea why the map function has javascript errors on my website. Thanks

http://www.lumiere.net/~clock/cgi-bin/gallery2/main.php?g2_view=map.ShowMap

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Thu, 2005-11-10 12:22
Termitenshort wrote:
Can you do a "view source code" and copy/paste into a .txt file and post here ?

ok here it is, in attachment

and this is my key entered in map theme (and in map module, they are the same)
ABQIAAAA5SREeKhHQ5CKTL33pm0kPRS3Lrh44-WtCYDgWILl-qQDbva5hhTfDTo3td37WgCqno-haZx90lQY4g

and in album.tpl I got this line...
<script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key={$theme.param\
s.GoogleMapKey}" type="text/javascript"></script>

If the key is wrong it wouldnt work, right? but it works, after that annoying message....

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Thu, 2005-11-10 12:23

Termite, can we make a sticky comment to this topic, for Map Wiki page?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-11-10 14:28

I'd like to update the first post of this topic with a more informal one.
- Short description of the topic
- What's the maps theme?
- what's the maps module?
- are both needed?
- link to current version / download instructions
- who's in charge / who was originally the other / contributors

etc.
actually, all things that could / should be answered on the codex page too, but since a lot of users find this topic, it would be good if we inform these users quickly.

could someone write down that stuff? i'll then put it into the first post.
thanks!

 
igrcic
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Thu, 2005-11-10 14:47

Hi valiant, i think that short description with link to map wiki page should be enough :)

http://codex.gallery2.org/index.php/Gallery2:Modules:Map

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 17:25
tc1234 wrote:
Hey termite thank you for the hard work
This may be a dumb question but how do I add markers and use pictures for the marker?

Once you have picture in your gallery click edit photo (or album) and the you will see a "Googl Map" Tab on which you can select GPS coordinate, color of the marker and "Zoom in" level

Once this is done, your map will show some markers with a link to the picture/albums ;)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 17:26
tc1234 wrote:
Hey termite do you have any idea why the map function has javascript errors on my website. Thanks

http://www.lumiere.net/~clock/cgi-bin/gallery2/main.php?g2_view=map.ShowMap

I don't see any JS errors beside the one related to the theme (but those are normal i believe)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 17:28
igrcic wrote:
Termitenshort wrote:
Can you do a "view source code" and copy/paste into a .txt file and post here ?

ok here it is, in attachment

and this is my key entered in map theme (and in map module, they are the same)
ABQIAAAA5SREeKhHQ5CKTL33pm0kPRS3Lrh44-WtCYDgWILl-qQDbva5hhTfDTo3td37WgCqno-haZx90lQY4g

and in album.tpl I got this line...
<script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key={$theme.param\
s.GoogleMapKey}" type="text/javascript"></script>

If the key is wrong it wouldnt work, right? but it works, after that annoying message....

I have looked at your code abd basicaly my recommendation would be to go in "Album.tpl" and remove completly the line

<script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key={$theme.param\
s.GoogleMapKey}" type="text/javascript"></script>

It should work just fine right after that ;)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 17:28
igrcic wrote:
Termite, can we make a sticky comment to this topic, for Map Wiki page?

Idon't know how to do that plus the wiki page is not completed yet. I'd like to get the complete instructions in :)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 17:31
igrcic wrote:
Hi valiant, i think that short description with link to map wiki page should be enough :)

http://codex.gallery2.org/index.php/Gallery2:Modules:Map

Yes I agree, I've started the Wiki to clarify things :-) I believe it would much more readable that the post that is starting to be way too big :)
I know I'm a bit at fault there ...

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2005-11-10 18:57

0.4.1 is looking really good.
I found that I did not care to see the 'Show Google Map' link under each
album; but rather, only in the sidebar. I went about looking for a way
to make this happen and qucikly got in over my head. I'm thinking that
permissions may not be fully addressed; but, I'm probably wrong. In any
case, I found where these links were generated from module.inc by commenting
some code and having the links disappear altogether. After muckin' about
I came up with this . . .

I commented out this:

//    function getItemLinks($items) {
//      $links = array();
//        foreach ($items as $item) {
//            $itemId = $item->getId();
//            $links[$itemId][] =
//              array('text' => $this->translate('Show Google Map'),
//                    'params' => array('view' => 'map.ShowMap'));
//        }
//      return array(GalleryStatus::success(), $links);
//    }

and replaced it with this:

    function getItemLinks($items, $wantsDetailedLinks, $permissions) {
        $links = array();
        foreach ($items as $item) {
            $itemId = $item->getId();
                if (isset($wantsDetailedLinks[$itemId])) {
                    $links[$itemId][] =
                        array('text' => $this->translate('Show Google Map'),
                              'params' => array('view' => 'map.ShowMap'));
                }
        }
        return array(GalleryStatus::success(), $links);
    }

}

Now the 'Get Google Map' link appears only in the sidebar (always).

 
samkuhn2

Joined: 2004-04-13
Posts: 60
Posted: Thu, 2005-11-10 19:14
Termitenshort wrote:
Yes I agree, I've started the Wiki to clarify things

The wiki doesn't mention that you're the primary driver on the module now though, Termitenshort. That should probably be noted.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-11-10 19:35
samkuhn2 wrote:
The wiki doesn't mention that you're the primary driver on the module now though, Termitenshort. That should probably be noted.

The greatest thing about the wiki is that _anybody_ can fix the documentation.

 
jelwell

Joined: 2003-05-29
Posts: 115
Posted: Thu, 2005-11-10 19:39
Termitenshort wrote:
Well as I promised here is today's upload with some more changes to the module :-)
The Termite :-)

Amazing! Termite, you are doing a wonderful job of running with the ball on this so quickly and effortlessly.

Thanks for all your hard work. I can't wait to integrate the new version of the module.
Joseph Elwell.

 
voidtrance

Joined: 2005-10-21
Posts: 26
Posted: Thu, 2005-11-10 21:36

I just installed the 0.4.1 version of the module and I think I have configured it correctly. After configuring that module, I went and added coordinates to one of my images using the "From address" option. The coordinates retrieved and were saved. However, when I click on the Show Google Map link, I get the map of the world (focus on 0,0) and not the coordinates.

I would appreciate any help that you might be able to give? I tried looking for the solution but could not find anything...

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 21:49
voidtrance wrote:
I just installed the 0.4.1 version of the module and I think I have configured it correctly. After configuring that module, I went and added coordinates to one of my images using the "From address" option. The coordinates retrieved and were saved. However, when I click on the Show Google Map link, I get the map of the world (focus on 0,0) and not the coordinates.

I would appreciate any help that you might be able to give? I tried looking for the solution but could not find anything...

Did you check the "AutoZoom" in the AdminPanel ?
If yes, can you provide a link or a view/source copy ?

Thx

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

 
voidtrance

Joined: 2005-10-21
Posts: 26
Posted: Thu, 2005-11-10 21:59
Termitenshort wrote:
Did you check the "AutoZoom" in the AdminPanel ?
If yes, can you provide a link or a view/source copy ?

Thanks for the quick reply! Actually, that was one of the problems. The other one was that I need to select a marker in the photo properties. I guess, without a selected marker color, there is no default and the marker just doesn't show.

Once, I changes those two little things, the markers started showing up, the map would center and zoom at the right place. This is a pretty awesome module!!

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2005-11-10 23:03

My 'Zoom In' link on the image popup seemed to be acting weird.
When clicked the map would zoom into a very wrong place on the map.
I found the following in ShowMap.tpl:

                    {if $map.showZoomLinks}
                        +'<br/><br/><a href="#" onclick="javascript:map.zoomTo({$point.zoomlevel});">{g->text text="Zoom In"}</a>'
                    {/if}

and changed it to:

                    {if $map.showZoomLinks}
                        +'<br/><br/><a href="#" onclick="javascript:map.centerAndZoom(new GPoint({$point.gps}), {$point.zoomlevel});
">{g->text text="Zoom In"}</a>'
                    {/if}

It now does what I would have expected.

 
ninjainvasion
ninjainvasion's picture

Joined: 2005-11-05
Posts: 78
Posted: Thu, 2005-11-10 23:03

Hi,

I just successfully upgraded from 0.3.2b to 0.4.1 - it looks and works great, thanks for the great work Termitenshort! The only problem that I still have is the HTTP 500 internal server error whenever I go to the map.MapSiteAdmin page. My internet provider wasn't very helpful with the error log, but I could identify the code line that causes the error by inserting some die() calls... it seems that the glob() call on line 929 in MapSiteAdmin.inc causes the problem (the line is "foreach (glob($basegallerydir."images/map/*",GLOB_ONLYDIR) as $filenames)"). Checking on php.net it says that the GLOB_ONLYDIR is only available in PHP>=4.3.3, but I use 4.4.0, so this should work. Checking the properties of the images and images/map directories and files in it, it seems all good... 755 for dirs and 644 for files, like all other dirs and files of the gallery. So I really don't see the point why this fails...

Does anybody have a clue?
Thanks

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

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2005-11-10 23:26

Is it/was it intentional that GallerymapMap::field - 'ZoomLevel' is not there?
This, I believe, causes individually set zoom levels to not take hold when
set within Edit Photo.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 23:49
galmoid wrote:
My 'Zoom In' link on the image popup seemed to be acting weird.
When clicked the map would zoom into a very wrong place on the map.
I found the following in ShowMap.tpl:

                    {if $map.showZoomLinks}
                        +'<br/><br/><a href="#" onclick="javascript:map.zoomTo({$point.zoomlevel});">{g->text text="Zoom In"}</a>'
                    {/if}

and changed it to:

                    {if $map.showZoomLinks}
                        +'<br/><br/><a href="#" onclick="javascript:map.centerAndZoom(new GPoint({$point.gps}), {$point.zoomlevel});
">{g->text text="Zoom In"}</a>'
                    {/if}

It now does what I would have expected.

thanks for fixing this problem, I was about to add a bug but I guess it's solved now ! :D
If you have a wiki account (for the gallery codex), you should add your name to the developpement team :-) HERE

See yo and thanks I added your fix to the current module files :-)

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-11-10 23:58
galmoid wrote:
Is it/was it intentional that GallerymapMap::field - 'ZoomLevel' is not there?
This, I believe, causes individually set zoom levels to not take hold when
set within Edit Photo.

Huh ? Not there where ? I have it in my DB I'm not sure what the problem is. Can I have a bit more details :D

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 00:11
ninjainvasion wrote:
Hi,

I just successfully upgraded from 0.3.2b to 0.4.1 - it looks and works great, thanks for the great work Termitenshort! The only problem that I still have is the HTTP 500 internal server error whenever I go to the map.MapSiteAdmin page. My internet provider wasn't very helpful with the error log, but I could identify the code line that causes the error by inserting some die() calls... it seems that the glob() call on line 929 in MapSiteAdmin.inc causes the problem (the line is "foreach (glob($basegallerydir."images/map/*",GLOB_ONLYDIR) as $filenames)"). Checking on php.net it says that the GLOB_ONLYDIR is only available in PHP>=4.3.3, but I use 4.4.0, so this should work. Checking the properties of the images and images/map directories and files in it, it seems all good... 755 for dirs and 644 for files, like all other dirs and files of the gallery. So I really don't see the point why this fails...

Does anybody have a clue?
Thanks

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

Do you know what OS is the server running on ?

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2005-11-11 00:23

I am only partially nuts. I kept trying to set the ZoomLevel to
zero and the form always came back stating success; but, the ZoomLevel
field remained blank. The database table reflected no change. I started
down one of my multi-tangential paths and after making my previous post, tried using a one instead of zero. This appeared to work;
but, I had to back out of the forest I entered before deciding it
was the '1' and not anything in the forest. It was the '1'. I have
not yet found where the zero is being rejected/neglected . . . but
trying.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 00:25

ninjainvasion, you can try a couple thing:

Try to change "images/map/*" for "images/map/*.*" in MapSiteAdmin.inc (just in case)

if not fixed, can you try this:
before the foreach on line 929, add a line:
$arrayfiles = glob($basegallerydir."images/map/*",GLOB_ONLYDIR);
(with a die after you can see if the problem is here or not)

Then check if $arrayfiles has some things in it:
if ($arrayfiles) { //do the foreach loop with $arrayfiles instead}

You can try to add this if condition for both foreach. It's possible that glob() does not work right.

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 00:31
jelwell wrote:
Quote:
Well as I promised here is today's upload with some more changes to the module :-)
The Termite :-)

Amazing! Termite, you are doing a wonderful job of running with the ball on this so quickly and effortlessly.

Thanks, I do my best to keep this module alive, I love it, it's great. I'm starting to wish I had more money to travel so I could put more pictures in my gallery with GPS coords :)

Maybe I should find a job as a developper or something

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 00:39

ninjavision, can you also check if your server has safe_mode or open_basedir-restrictions ? maybe there is something preventing glob() to function all together

thx

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

 
ninjainvasion
ninjainvasion's picture

Joined: 2005-11-05
Posts: 78
Posted: Fri, 2005-11-11 00:58
galmoid wrote:
I kept trying to set the ZoomLevel to
zero and the form always came back stating success; but, the ZoomLevel
field remained blank. The database table reflected no change.

I have also noticed this, I think somewhere in the mapHelper::saveFieldValues($item, $form['fields']); call in mapItemEdit.inc:120 the 0 might be converted to 'no value'... is that possible?

Termitenshort wrote:
ninjainvasion, you can try a couple thing:

Try to change "images/map/*" for "images/map/*.*" in MapSiteAdmin.inc (just in case)

Weird but cool, this works!!! Thanks Termite, you're the man ;)

Termitenshort wrote:
Do you know what OS is the server running on ?

Termitenshort wrote:
ninjavision, can you also check if your server has safe_mode or open_basedir-restrictions ? maybe there is something preventing glob() to function all together

Not necessary anymore, but just for info:
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

safe_mode is off, and open_basedir seems to have no restrictions.

Thanks!

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

 
voidtrance

Joined: 2005-10-21
Posts: 26
Posted: Fri, 2005-11-11 02:01

Quick question: is there a way to remove the saved coordinates for an image or an album?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 02:05
voidtrance wrote:
Quick question: is there a way to remove the saved coordinates for an image or an album?

there used to be, but I have added some error control in for that field and completly forgot that it was possible to be willing to delete coordinate.

You can always edit the database directly (if you have access), the table name is g2_mapmap and the field shoud be called GPS, the item id is the one of the photo/album

I'll be fixing this

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 02:06
ninjainvasion wrote:
Weird but cool, this works!!! Thanks Termite, you're the man ;)

sweeet, I'll be changing that on the next release, it shouldn't affect anyone else negatively :D

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 02:07
ninjainvasion wrote:
I have also noticed this, I think somewhere in the mapHelper::saveFieldValues($item, $form['fields']); call in mapItemEdit.inc:120 the 0 might be converted to 'no value'... is that possible?

Yes, for the time being you can input 0. instead of 0 and it works fine. I will dig in the code to fix that :D

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-11-11 02:16
Quote:
ninjainvasion wrote:
I have also noticed this, I think somewhere in the mapHelper::saveFieldValues($item, $form['fields']); call in mapItemEdit.inc:120 the 0 might be converted to 'no value'... is that possible?

Yes, for the time being you can input 0. instead of 0 and it works fine. I will dig in the code to fix that :D

Also, if you feel like not entering 0., you can add the following to mapItemEdit.inc at line 90:

if (($form['fields']['ZoomLevel']!="") and ($form['fields']['ZoomLevel']==0)) $form['fields']['ZoomLevel']="0.0";