Google Maps + Gallery

Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 00:14
dotnature wrote:
I think for thumbnails per marker I'd prefer them in a sidebar or movie strip above map if that is even possible. That also got me thinking I tried to look around but didn't find anything, is there a way to get the marker pop-up to display on left or right of marker instead of above it.

The movie strip deal is comming I was thinking of a way to get that in there. Sidebar should be pretty easy as well.

The infowindow can be placed anywhere even thought at this point with the pics we're using (google built-in) they really look better on top.

I guess it's something to think about as well, maybe put some more details on it :-)

See you

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 00:47

Ok, Today is the release of version 0.4.6 as promised :-)

2005-12-17: v 0.4.6 (ehd) Changes:

        - Made the legend a block as well (left sidebar)
        - Added the ability to enable/disable "export to GE"
        - finished the upgrade path
        - Route feature enhancements
              o Rewrote the route feature to use itemID instead of coordinates
              o Added possibility to use an Item more than once in a route
        - Enhanced the filter feature
              o Route "filters" are created on the fly
              o Possibility of Album filters (only show items with coord in the Album and subalbums)
        - Added a Google Map Key Management feature.
        - Added the possibility to use % for map Height and width

Please note the following (important):
- I've try to make an automatic way to upgrade from the old route to the new routes but it does not seem to work :-(
-> you will have to re-create your routes manually unless you figure out the code changes in Module.inc (sorry)

- The new way of managing the Google Map key, invalidate the old key so you will nedd to re-enter your key to get the map to display.

- The "%" feature actually change the size of the <div> where the map is dynamicaly accroding to the size of the window. It is possible that funny behaviour occurs in that scenario (I haven't experienced any but one never knows ...)

One more thing Please go to the Map Module Gallery , to add you picture (or a random picture) with your coords so that we have everybody there :-) (remember I broke the site and everything got wiped out)

Enjoy !

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

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 02:12

Great work, Termite.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sun, 2005-12-18 02:56

Termite

Nice work! However, after upgrading from 0.4.5d I have that same bug that occured in 0.4.5d. Think I upgraded from cvs that time. I remember you posted a patch in this forum (around 10Dec) that fixed it. The error prints at the top of my map page.

Warning: array_key_exists(): The second argument should be either an array or an object in /var/www/localhost/htdocs/gallery2/modules/map/ShowMap.inc on line 945

Warning: array_key_exists(): The second argument should be either an array or an object in /var/www/localhost/htdocs/gallery2/modules/map/ShowMap.inc on line 962

EDIT: Nevermind fixed it myself. Appended and $file != "CVS")
to ShowMap.inc on lines 942 and 959.
Did this not get committed to CVS?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 04:26
swordfish wrote:
Termite

Nice work! However, after upgrading from 0.4.5d I have that same bug that occured in 0.4.5d. Think I upgraded from cvs that time. I remember you posted a patch in this forum (around 10Dec) that fixed it. The error prints at the top of my map page.

Warning: array_key_exists(): The second argument should be either an array or an object in /var/www/localhost/htdocs/gallery2/modules/map/ShowMap.inc on line 945

Warning: array_key_exists(): The second argument should be either an array or an object in /var/www/localhost/htdocs/gallery2/modules/map/ShowMap.inc on line 962

EDIT: Nevermind fixed it myself. Appended and $file != "CVS")
to ShowMap.inc on lines 942 and 959.
Did this not get committed to CVS?

I guess I've lost the change along the way .... I've just made the change again and uploaded to CVS. It doesn't affect people not getting the module from cvs so it should be fine :-)

Thanks !

 
kilativ

Joined: 2005-11-30
Posts: 29
Posted: Sun, 2005-12-18 04:27

I am in the process of moving to a new host. I've installed the latest version of the module. Since i didn't transfer the domain name yet, i am using the gallery by IP address. I created a new Google Map API key, but i keep getting the following error:

Quote:
---------------------------
Microsoft Internet Explorer
---------------------------
The Google Maps API key used on this web site was registered for a different web site. You can generate a new key for this web site at http://www.google.com/apis/maps/.
---------------------------
OK
---------------------------

any advice?

thanks

 
kilativ

Joined: 2005-11-30
Posts: 29
Posted: Sun, 2005-12-18 04:45

for some reason i don't see google key map in g2_PluginParameterMap any more. hm. Also when i created 3 profiles i couldn't select 2nd or 3rd one.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 05:54
kilativ wrote:
for some reason i don't see google key map in g2_PluginParameterMap any more. hm. Also when i created 3 profiles i couldn't select 2nd or 3rd one.

What do you mean about not being able to select them?
In g2_PluginParameterMap the new g_parameterName is MapKeys.
Do you see MapKeys?
What is the URL to your map?
By the way, the profiles work perfectly for me. I have created
four of them. They all show up in the dropdown box.
Maybe try this in ShowMap.inc (it will probably mess
up some font formatting on the page; but, it will
print the severname at the top of the page.

/**
 * This implements the Google map view
 *
 * @package Map
 */
$serverName=$_SERVER['SERVER_NAME'];
print("servername = $serverName<br>");

After you determine the servername, add a profile
using the reported servername and use the map key that
you obtained for your IP address URL. I just tried
this and it worked.
Don't forget to remove the print statement, etc. you added.

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Sun, 2005-12-18 07:53

Just a general gps question I was messing around with the map and is there a reason to have so many decimal places in the co-ordinates?
Maybe I misunderstand how it works but the default is 14 decimal places (like 32.60175704956055) which I dont know how accurate that is but isnt 6 decimal places 10 centimeter, so 14 would be quite accurate, maybe from storage point of view 10 centimeter is enough? As an example I cut my profile down on termites map to just 4 decimal points (45.6244) and was still able to plant a marker on a house, with 14 I can place the marker on a pebble in the driveway.

 
kilativ

Joined: 2005-11-30
Posts: 29
Posted: Sun, 2005-12-18 08:05

oh, ok. i do see MapKey record having some values. Here is the link to my gallery http://209.123.15.121/gallery/main.php?g2_view=map.ShowMap after i looked at the html source and notice that "key" value is not populated at all.

Quote:
<script src="http://maps.google.com/maps?file=api&amp;v=1.28&amp;key=" type="text/javascript"></script>

on my old account and older version of Map module it generated the following string

Quote:
<script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key=ABQIAAAAa6dOKP9ZAgcAD9eddCD8RRSkVXYFr2zmhepYhh7mhu3Q8UXuYRTaX_pU65dcgd8y88sF1jwb5smVQQ" type="text/javascript"></script>

I've tried your suggestion. The key is still empty in the HTML source.

As for the first question, what do i mean by "unable to select the other profile" here is what i do. I create another profile. Let's say "pofile 2", then select it in the drop down and hit "save". the page reloads with the first one selected again.

Thanks for looking into this.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sun, 2005-12-18 08:05

I've just noticed when using the Map Album Legend when the map first loads I have the Group icons as expected.
But, when unchecking the Album and then checking the box again ALL of the balloon marker icons appear instead.
See Before and After screenshots attached. My question, is this the intended behavior?

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 14:56
kilativ wrote:
I've tried your suggestion. The key is still empty in the HTML source.

As for the first question, what do i mean by "unable to select the other profile" here is what i do. I create another profile. Let's say "pofile 2", then select it in the drop down and hit "save". the page reloads with the first one selected again.

Thanks for looking into this.

* What did 'print(servername)' say?

I suspect your actual servername does not match any of the
any of the servername entries in your profiles. So no map key
is returned.

It is not necessary to select a profile. You just need to add
the ones you need and then, depending on the servername
being used to access the site(map), a key is returned (the one
that matches the servername). The idea is to be able to
access the map via different servers (names) and have the proper
key automatically used. For instance, a different map key is
necessary if you access the map via www.xxx.xxx on port 80 (the
usual http port) as compared to accessing the map via
www.xxx.xxx on port 443 (the secure ssl port). Creating two
profiles, one for port 80 and one for port 443 (both with
the same servername (different profile names of course) would
permit the proper key for each to be used automatically (you
need not do anything other than create the profiles).

* What did 'print(servername)' say?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 15:22
swordfish wrote:
I've just noticed when using the Map Album Legend when the map first loads I have the Group icons as expected.
But, when unchecking the Album and then checking the box again ALL of the balloon marker icons appear instead.
See Before and After screenshots attached. My question, is this the intended behavior?

No it isn't and I didn't know that ninjainvasion had the marker hidden instead of reomved from the list ... That' causing a problem and I'm not sure how to fix it at this point.

I'll have to talk to ninjainvasion and see what we can do :)

In other word, it's a bug :)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 15:28

kilativ, galmoid is right, you do not need to select a prfile. the all idea if to be able to generate as many profile as you may need and let it select the right one by itself.

The way it works is it determines the server name and port currently in use (i.e. 209.123.15.121 and 80) and then it cycle looks at all the profile created and select the one that have matching servername and portnumber.

The key is selected from that. If you do not have a profile created with the right paramters, it will return an empty key (-> your problem)

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

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 15:59
Termitenshort wrote:
kilativ, ...The way it works is it determines the server name and port currently in use (i.e. 209.123.15.121 and 80)...

It should be noted: The server name is -not- always the same as
the URL that you use (especially when using an IP address in
your URL). I access a server using the IP address -and- the
actual server name is u30 (not the IP address). The server name
is configured in httpd.conf (in apache at least).

This is why I suggest the 'print(severname)' thing . . . to find
this out.

Thank You, Termite, for putting this in. It works great.

 
kilativ

Joined: 2005-11-30
Posts: 29
Posted: Sun, 2005-12-18 16:15

thank you, galmoid!!! now it makes sense. It did print out my domain name, even though i didn't transfer yet. I tried your suggestion to use that key, but it didn't work the first time because i didn't realize that i should also enter the same domain name in the profile. After you explained how it works it took me 10 seconds to make it work.

Thanks again!!!

 
kilativ

Joined: 2005-11-30
Posts: 29
Posted: Sun, 2005-12-18 16:19

Termitenshort, thank you too. great work guys!

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 16:32
kilativ wrote:
Thanks again!!!

You're welcome. Glad you got it working.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 16:42

Although slightly off topic (but then again related to the key profile stuff),
a short discussion I had with valiant can be found here.
It is in keeping with my (and probably I'm the only one doing this) desire to
maintain one gallery accessed via diferent domain names and have the galleries
show up diferently (as compared to setting up multi-site galleries).
I know, it's nutty (crazy); but, I'm nuts.

Separately, Google API 1.29 is out.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 17:32
galmoid wrote:
Although slightly off topic (but then again related to the key profile stuff),
a short discussion I had with valiant can be found here.
It is in keeping with my (and probably I'm the only one doing this) desire to
maintain one gallery accessed via diferent domain names and have the galleries
show up diferently (as compared to setting up multi-site galleries).
I know, it's nutty (crazy); but, I'm nuts.

Separately, Google API 1.29 is out.

totally off topic and inapropriate :-) ('kidding) the good news is that thanks to that post I discovered
GalleryUtilities::getServerVar

and so I updated the code with it (better to use the built-in stuff)

Also got me thinking since there is no pressing needs in terms of functionality, I'm gonna ask bharat for a code review.
I'm sure there is many changes to make to get it validated so :-)

Also aparently 1.29 still works as it is. So I made the change and I've uploaded it to CVS :-)

 
joelion

Joined: 2004-11-04
Posts: 19
Posted: Sun, 2005-12-18 17:35

I am having the same problem that kilativ was, where I get this error when I try to view a map, or simply try to set a starting lat/long:

Quote:
The Google Maps API key used on this web site was registered for a different web site. You can generate a new key for this web site at http://www.google.com/apis/maps/.

I have tried to go through all the troubleshooting you did for kilativ, but to no avail.
I have 0.4.6 installed on Gallery2.0.2. According to phpinfo() my SERVER_NAME is set correctly at www.thalions.com. I am running a multi-site installation, and using the wordpress integration theme, but I get the same error regadless of which installation I use (i.e. my wordpress one or the main gallery in the main folder).

I have the main gallery installation at thalions.com/gallery2
Then a sub-installation (multi-site installation) at thalions.com/blogs/joe/gallery2
I have generated Maps API keys for all directories I can think of, and added them all to profiles but I still get that error. I have generated keys for thalions.com/gallery2, thalions.com, thalions.com/blogs/joe, thalions.com/blogs/joe/gallery2, but none of them work.

ideas?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 17:51

Also, I have just found a couple of bugs in the filter feature.

- After upgrading to version 0.4.6 you can go ahead and delete all "automaticaly" generated filters in the admin panel
-> those are the one that start with "Route:"

- When you have no filter create beside the automatic Album & Route ones, some error display at the top of the Map and also the "Default" filter does not show up.
-> Fixed in CVS

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

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 17:52
joelion wrote:
my SERVER_NAME is set correctly at www.thalions.com.

What does the 'print(servername)' stuff report? I expect, from
what you have stated, it is www.thalions.com.

Did you generate a key for http://www.thalions.com ? From
your atements regarding all of the directories you want to
use map in, that key would cover them all.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 17:54
joelion wrote:
ideas?

You can use a Google Key for the host only (i.e. http://www.thalions.com) and then create the related profile.

Name : whatever you like
Host : www.thalions.com
Port : 80
Key : ABQIAAAA6XFJQ83bN2_AljUYzYTYDxSixjjG2qBjWhq6GiWOHdhA7IyBlhQ-LsDo4rngYPG55LG0fAEZq28uwA

See you

 
kilativ

Joined: 2005-11-30
Posts: 29
Posted: Sun, 2005-12-18 18:12

I think dropdown for profiles is confusing because it looks like you have to select one of them. Maybe just a regular list with add/edit/delete links would make it clearer. Just a suggestion.

 
joelion

Joined: 2004-11-04
Posts: 19
Posted: Sun, 2005-12-18 18:25

where do I execute the print(servername) command? Is that a PHP command, or can I put that in smarty tags somewhere?

Quote:
Did you generate a key for http://www.thalions.com ? From your atements regarding all of the directories you want to use map in, that key would cover them all.

The way I read the Maps Key generator page, you have to generate a new key for each directory on your webserver.
For my directory info again, my main installaion is
www.thalions.com/gallery2
The sub-installation I want to use the maps on is
www.thalions.com/blogs/joe/gallery2

I've generated and tried all the following directory/key pairs and they all give the same error:
http://www.thalions.com - ABQIAAAAAE3F6I3ENVXn_6Axrlg3URSixjjG2qBjWhq6GiWOHdhA7IyBlhQg879Y5qwxjV6tTEdNzukLHheFCQ
http://www.thalions.com/gallery2/ - ABQIAAAAAE3F6I3ENVXn_6Axrlg3URRa3Bgk2domX6ql-usSRhEqcD2PWRQlpOjOJcGDkTn4qgixnk0jPn8BGw
http://www.thalions.com/blogs/joe/ - ABQIAAAAAE3F6I3ENVXn_6Axrlg3URTJ_kvQ8u5p55_J_JbH09uQ30iXShRe_Y-6gAUy_pq2CX8ZiEfaMPuwmw
http://www.thalions.com/blogs/joe/gallery2/ - ABQIAAAAAE3F6I3ENVXn_6Axrlg3URQVt9WuVMxgB1qaKupKOqvuKYJ87RTg2-S2Y_-f-rK8oa8co3SBP9BeRw

I've tried all 4 of those on both of the gallery installs at both locations with no result

edit - and I agree with ^ too about the profile manager interface. It's unclear how you're supposed to use it after you enter profiles, not to mention you can't edit them (not that you would need to after you find the right configuration, but i'm doing a lot of "add" then "delete"ing of profiles....

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 18:36
Termitenshort wrote:
Name : whatever you like
Host : www.thalions.com
Port : 80
Key : ABQIAAAA6XFJQ83bN2_AljUYzYTYDxSixjjG2qBjWhq6GiWOHdhA7IyBlhQ-LsDo4rngYPG55LG0fAEZq28uwA

This works for mw. I've fake the IP address (with my host file) and point it to my server. I have used the key above (different from the one you pasted for some reason)

The best way to use the google api key is to generate it for the root server (no directory) so that wherever it is on your webserver it works.

If you ant, just PM me with user/pass for your gallery and i'll get it to work.

I will think of something better for the interface (the list deal sounds good)

See you

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 18:42

On a completely different note, I've got the tracklog tracer working :-)

Here is the result of the coalcreek deal, looks nice now :-)

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

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 18:43
joelion wrote:
where do I execute the print(servername) command? Is that a PHP command, or can I put that in smarty tags somewhere?

In ShowMap.inc just after the initial comments, at the top of the
file, insert this:

$serverName=$_SERVER['SERVER_NAME'];
print("servername = $serverName<br>");

When you access the your map page the server name will be printed
at the top of the page (this will probably mess up some formatting; but,
won't hurt anything).

If the server name is www.thalions.com then using that as server name in
a profile along with, probably, port 80 and the key that you generated
for www.thalions.com will work for all of you directories. The google
map keys work for any and all directories contained with that which
the key was generated for. Just do what Termite said above.

Remember to remove the 'print(servername)' stuff.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 18:47
Termitenshort wrote:
On a completely different note, I've got the tracklog tracer working :-)

Here is the result of the coalcreek deal, looks nice now :-)

Hey man, that's great. Did you monitor FF memory usage before
and after the display? Was it sluggish at all? Did you use all
of the points (6000+)?

It sure is a complex track.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 19:00
Termitenshort wrote:
totally off topic and inapropriate

Since I have a tendency to read word-by-word, You -really- got
me with that. What a relief when I finally got to the smile.
Glad you got something out of it at least.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 19:29
galmoid wrote:
Quote:
On a completely different note, I've got the tracklog tracer working :-)

Here is the result of the coalcreek deal, looks nice now :-)

Hey man, that's great. Did you monitor FF memory usage before
and after the display? Was it sluggish at all? Did you use all
of the points (6000+)?

It sure is a complex track.

Well the memory usage seems fine on FF 1.5 and yes I have traced all of the 6000+ points. In fact I made it now so that you can have any garbage you want in the file, it will go out and trace it cleanly.

I've tried with all the tracklogs I have (3 only ... :D) and it seems fine at this point.

It's splitted in different subsection:

First it looks for TRK
Then it spilt the tracks in TRKSEG
Then if the track is longer than 499 points, it splits it in chunk of 100 and create a last polyline at the end with the remainder points. It also akes sure that the "pieces" of polyline are overlapping so it looks line one :-)

It's probably not perfect at this point but I'll be looking at making it even better

I will implement that in the next release coz it's cool :D

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-12-18 19:30
galmoid wrote:
Quote:
totally off topic and inapropriate

Since I have a tendency to read word-by-word, You -really- got
me with that. What a relief when I finally got to the smile.
Glad you got something out of it at least.

Sorry it was a pretty bad joke :) Anything related (even a little) is always usefull in some way :)

 
joelion

Joined: 2004-11-04
Posts: 19
Posted: Sun, 2005-12-18 19:37

hmm, well when i go to the Maps Key generator, I get the one that I pasted earlier, not the one that galmoid gets.... that's weird. Would that have anything to do with the fact that I'm doing this in Germany? Does the API TOS say anything about differences between the US and rest of the world?

Either way, using the key that you generated still gives an error.

What's worse, when I enter the printserver code into the .inc file, this is the output I get when viewing a map:

Quote:
servername =

Warning: array_key_exists(): The second argument should be either an array or an object in /home/virtual/site91/fst/var/www/html/gallery2/modules/map/ShowMap.inc on line 946

Warning: array_key_exists(): The second argument should be either an array or an object in /home/virtual/site91/fst/var/www/html/gallery2/modules/map/ShowMap.inc on line 946

Warning: array_key_exists(): The second argument should be either an array or an object in /home/virtual/site91/fst/var/www/html/gallery2/modules/map/ShowMap.inc on line 946

Warning: array_key_exists(): The second argument should be either an array or an object in /home/virtual/site91/fst/var/www/html/gallery2/modules/map/ShowMap.inc on line 963

Warning: array_key_exists(): The second argument should be either an array or an object in /home/virtual/site91/fst/var/www/html/gallery2/modules/map/ShowMap.inc on line 963

Warning: array_key_exists(): The second argument should be either an array or an object in /home/virtual/site91/fst/var/www/html/gallery2/modules/map/ShowMap.inc on line 963

You can see that the server name is blank, and i get a whole list of errors. When I remove the printserver code, I still get those errors. I had not seen those errors previously because I was testing the key by using the "center on" map on the Admin page (which doesn't generate those PHP errors) instead of the "Show google map" option for the albums.

I'll create an account and PM you the info termite.
thx a lot

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 20:27

joelion,
Try this to print the server name (in the same place in ShowMap.inc):

$serverName = GalleryUtilities::getServerVar('HTTP_HOST');
$serverPort = GalleryUtilities::getServerVar('SERVER_PORT');

print ("serverName = $serverName<br>");
print ("serverPort = $serverPort<br>");

It does the same thing; but, it is in keeping with the Gallery coding.

This print server name stuff does not/did not cause your php errors (at
least I don't believe it does).

EDIT: Sorry, changed HTTP_PORT to SERVER_PORT

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 20:29
Termitenshort wrote:
Sorry it was a pretty bad joke

Not at all . . . I got a kick (laugh) out of it. It is
very similar to my humor (as you have seen in the past).

 
joelion

Joined: 2004-11-04
Posts: 19
Posted: Sun, 2005-12-18 21:11

^^ ok, using that I get the correct server output

Quote:
serverName = www.thalions.com
serverPort = 80

So i was putting in the right values for my profiles... Do you think this PHP error has something to do with the problems or is that another issue. I've deleted and installed the module several times, and I've installed 0.4.5c also but have the same problems.

Perhaps I could hardcode a key and servername and port somewhere to try to bypass the profiles and see if that helps?
In the showmap.inc I commented out the
if (array_key_exists('MapKeys',$param) and $param['MapKeys'] != ""){....
block at line 771 and replaced it with:
$map['googleMapKey']="xxx...";
and tried a few different keys, but still got the same error. Is there somewhere I can hardcode the server and ports too?

edit - looking through the code it looks like the server and ports aren't really used except to select the correct mapkey, is that correct? so you should be able to skip all that and just hardcode in the key, right? when i do that though I still get the error and in the source for the map page the key= is still blank in the script URL.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 23:11

joelion,
Addressing your desire to hardcode the map key . . .

Create a local directory in templates (modules/map/templates/local)
Copy templates/MapHeader.tpl to the local directory
Edit templates/local/MapHeader.tpl
Change:

<!-- Google Maps script -->
<script src="http://maps.google.com/maps?file=api&amp;v=1.28&amp;key={$map.googleMapKey}" type="text/javascript"></script>
<!-- This is mostly boilerplate code from Google. See: http://www.google.com/apis/maps/documentation/ -->

to:

<!-- Google Maps script -->
<script src="http://maps.google.com/maps?file=api&amp;v=1.28&amp;key=PUT_YOU_HARDCODED_MAP_KEY_HERE" type="text/javascript"></script>
<!-- This is mostly boilerplate code from Google. See: http://www.google.com/apis/maps/documentation/ -->

Substitute your map key for PUT_YOU_HARDCODED_MAP_KEY_HERE

Uncomment the lines you commented in ShowMap.inc

Does this help?

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2005-12-18 23:38

Termite,
I think you might envision the need for this; although, you will
probably have a better way to achieve the result. :-)

In ShowMap.inc just after line 278 add:

$cntids=count($ids);
if ($cntids > 0)
{

also in ShowMap.inc just after line 756 add:

}
else
{
$map['noitemperms']=true;
}

In ShowMap.tpl just after line 40 add:

<!--
If there are no items with sufficient permissions to be mapped then display a message
-->
    {if $map.noitemperms}
    <div class="gbBlock">
        <center><h2 class="giError">{g->text text="There are no items available to be mapped"}<br/><br/>
        <a href='Javascript:history.go(-1);'>Go Back</a></center></h2>
        </div>
    {/if}

Also in ShowMap.tpl change line 44 from:

{if !$map.nogpscoords}

to:

{if !$map.nogpscoords and !$map.noitemperms}

I have been messin' around with permissions and found I ran into problems
when there existed items -with- coordinates but not sufficient permissions.

 
conorboyd

Joined: 2005-03-29
Posts: 166
Posted: Sun, 2005-12-18 23:47

Hi guys,

Just trying 0.4.6.

Looks good, although I've come across at least one thing that appears to have regressed since the previous version.
The filters on the map page no longer seem to respect the zoom level originally set on the filter; e.g. I've got a filter for New Zealand. When I choose the filter, the map will become centred on New Zealand, but it doesn't zoom in to the level I had specified for the filter.

Another thing is the Get via Map utility when working with filters. The map shown for choosing your filter is only about 100 pixels wide and tall on my site! Get via Map seems to work okay with albums still.

Also, clicking on an album listed in the Filters combobox results in a blank page in my browser.

I like the % setting for the map size though!

http://gallery.ildica.com/main.php?g2_view=map.ShowMap

Keep up the good work!

Cheers,

Conor

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Mon, 2005-12-19 00:01

conorboyd,
Weird. I went to your map and found one available filter "New Zealand - South Island".
When I choose that filter I got no map; but instead, got this:

There was a hacking attempt on the filter name, please remove the filter option from the address bar.

The filter dropdown then said <<No Filters>>

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Mon, 2005-12-19 00:56
Termitenshort wrote:
Well the memory usage seems fine on FF 1.5 and yes I have traced all of the 6000+ points. In fact I made it now so that you can have any garbage you want in the file, it will go out and trace it cleanly.

I've tried with all the tracklogs I have (3 only ... :D) and it seems fine at this point.

It's splitted in different subsection:

First it looks for TRK
Then it spilt the tracks in TRKSEG
Then if the track is longer than 499 points, it splits it in chunk of 100 and create a last polyline at the end with the remainder points. It also akes sure that the "pieces" of polyline are overlapping so it looks line one :-)

It's probably not perfect at this point but I'll be looking at making it even better

I will implement that in the next release coz it's cool :D

Termite, you have outdone yourself. You think it's cool -and-
you don't even have a GPS! Looks like you'll be spendin' a
few bucks soon. :-)

I'll look about for some more track files when I get a chance (so you have more than three ;-) )

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-12-19 01:41

joelion,

I have your problem solved for some unknown reason .. I've just created a "test" profile and now there is no more errors and the key gets populated (I checked in the source)

The only last thing to do is to enter some item with GPS coordinates and you should be all set to go :-)

I have used this key: ABQIAAAA6XFJQ83bN2_AljUYzYTYDxSixjjG2qBjWhq6GiWOHdhA7IyBlhQ-LsDo4rngYPG55LG0fAEZq28uwA It was generated for http://www.thalions.com

Let me know if you have any more issues :-)

PS: you can delete my account if you wish :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-12-19 01:44
galmoid wrote:
I have been messin' around with permissions and found I ran into problems
when there existed items -with- coordinates but not sufficient permissions.

Sweet, thanks I had that issue once and never had time to get it resolved :-)

I'll get that added to the code this week

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-12-19 01:52
conorboyd wrote:
Hi guys,

Just trying 0.4.6.

Looks good, although I've come across at least one thing that appears to have regressed since the previous version.

oooOOooOh that's not good. I swear this was not the intension ... :)

conorboyd wrote:
The filters on the map page no longer seem to respect the zoom level originally set on the filter; e.g. I've got a filter for New Zealand. When I choose the filter, the map will become centred on New Zealand, but it doesn't zoom in to the level I had specified for the filter.

That's possibly due to the % feature I've just added. I just realised I forgot a validation that could cause that behaviour. :(

conorboyd wrote:
Another thing is the Get via Map utility when working with filters. The map shown for choosing your filter is only about 100 pixels wide and tall on my site! Get via Map seems to work okay with albums still.

Probably also due to the same feature. I'll take a look at it.

conorboyd wrote:
Also, clicking on an album listed in the Filters combobox results in a blank page in my browser.

Hmmm ... weird. I don't get that and I can reproduce it on my boxes.

conorboyd wrote:
I like the % setting for the map size though!

http://gallery.ildica.com/main.php?g2_view=map.ShowMap

Keep up the good work!

Cheers,

Conor

THX :-)

Also your experience made me look further and I just realized that it was very possible that Get via map would stop working all together. I need to do some cheking.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-12-19 01:54
galmoid wrote:
Termite, you have outdone yourself. You think it's cool -and-
you don't even have a GPS! Looks like you'll be spendin' a
few bucks soon. :-)

I wish I could, if you guys don't know what to offer me for christmas you know now :D

galmoid wrote:
I'll look about for some more track files when I get a chance (so you have more than three ;-) )

Nice, I sure would like to do more testing.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-12-19 01:57

One more thing,

There is 4 or 5 bugs that just came out but I really don't have the time to document them today or tomorrow. Can you guys please update the wiki with all the problems found ?

I'd like to get working on them all on tuesday night but I need some help putting them in word on the wiki :-)

Thanks a bunch
-------------------------
The Termite :-)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Mon, 2005-12-19 02:03

Termite,
I found the mother of all tracklogs. On THIS page,
above the story, click on 'GPS data' to get to the tracklogs, etc. These folks are -real-
troopers (and you thought my little 18 mile hike was something!). I would have
just posted them here for you; but, they are too big, I think.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-12-19 02:12
galmoid wrote:
Termite,
I found the mother of all tracklogs. On THIS page,
above the story, click on 'GPS data' to get to the tracklogs, etc. These folks are -real-
troopers (and you thought my little 18 mile hike was something!). I would have
just posted them here for you; but, they are too big, I think.

Holly s*** it's HUGE. 18M file ... I'm not even sure php can load the file :-)

I'm gonna try to see if it does something

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-12-19 03:22

The tracklog adventure continues
After a first try I get the following results.

Both IE and FF parse the file and put it in an array in 45 seconds (which requires making the "maximum execution time for script" higher than 30 sec ...)

After 2 Minutes FF 1.5 crashes and gives up :(

IE display the track after a total of 6 minutes ... the problem is that each zoom change basically takes 4-6 minutes to display. So it wokrs but is totally unusable at this point. Drag & drop is extremely slugish ... of course :-)

Also during the all process the CPU is 100% but my current machine is 3 years old (athlon XP 2000+ @ 1.5Ghz). I will test on a much faster machine.

Sometime on IE I get a "script is taking long, do you wish to cancel or continue ?" (to wich I answer cancel of course :)

Bottom line for test 1: I need to figure out some optimization of the display code

Also check out the memory usage for IE (from 9M to almost 190M) and the track itself displayed !!

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