Google Maps + Gallery
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
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): - 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 Enjoy ! ------------------------- |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
Great work, Termite. |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
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 |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
swordfish wrote:
Termite 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 |
![]() |
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:
--------------------------- any advice? thanks |
|
kilativ
Joined: 2005-11-30
Posts: 29 |
![]() |
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 |
![]() |
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? /** * This implements the Google map view * * @package Map */ $serverName=$_SERVER['SERVER_NAME']; print("servername = $serverName<br>");
After you determine the servername, add a profile |
|
dotnature
![]()
Joined: 2005-10-26
Posts: 224 |
![]() |
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? |
|
kilativ
Joined: 2005-11-30
Posts: 29 |
![]() |
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&v=1.28&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&v=1&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
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
I've just noticed when using the Map Album Legend when the map first loads I have the Group icons as expected. |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
kilativ wrote:
I've tried your suggestion. The key is still empty in the HTML source. * What did 'print(servername)' say? I suspect your actual servername does not match any of the It is not necessary to select a profile. You just need to add * What did 'print(servername)' say? |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
swordfish wrote:
I've just noticed when using the Map Album Legend when the map first loads I have the Group icons as expected. 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
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) ------------------------- |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
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 This is why I suggest the 'print(severname)' thing . . . to find Thank You, Termite, for putting this in. It works great. |
|
kilativ
Joined: 2005-11-30
Posts: 29 |
![]() |
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 |
![]() |
Termitenshort, thank you too. great work guys! |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
kilativ wrote:
Thanks again!!! You're welcome. Glad you got it working. |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
Although slightly off topic (but then again related to the key profile stuff), Separately, Google API 1.29 is out. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
galmoid wrote:
Although slightly off topic (but then again related to the key profile stuff), totally off topic and inapropriate 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. 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 |
![]() |
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 the main gallery installation at thalions.com/gallery2 ideas? |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
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 - 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. See you |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
joelion wrote:
my SERVER_NAME is set correctly at www.thalions.com. What does the 'print(servername)' stuff report? I expect, from Did you generate a key for http://www.thalions.com ? From |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
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 See you |
|
kilativ
Joined: 2005-11-30
Posts: 29 |
![]() |
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 |
![]() |
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. I've generated and tried all the following directory/key pairs and they all give the same error: 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Termitenshort wrote:
Name : whatever you like 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
On a completely different note, I've got the tracklog tracer working Here is the result of the coalcreek deal, looks nice now ------------------------- |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
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 $serverName=$_SERVER['SERVER_NAME']; print("servername = $serverName<br>"); When you access the your map page the server name will be printed If the server name is www.thalions.com then using that as server name in Remember to remove the 'print(servername)' stuff. |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
Termitenshort wrote:
On a completely different note, I've got the tracklog tracer working Hey man, that's great. Did you monitor FF memory usage before It sure is a complex track. |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
Termitenshort wrote:
totally off topic and inapropriate Since I have a tendency to read word-by-word, You -really- got |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
galmoid 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 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
galmoid wrote:
Sorry it was a pretty bad joke |
|
joelion
Joined: 2004-11-04
Posts: 19 |
![]() |
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 = 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. |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
joelion, $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 EDIT: Sorry, changed HTTP_PORT to SERVER_PORT |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
Termitenshort wrote:
Sorry it was a pretty bad joke Not at all . . . I got a kick (laugh) out of it. It is |
|
joelion
Joined: 2004-11-04
Posts: 19 |
![]() |
^^ ok, using that I get the correct server output Quote:
serverName = www.thalions.com 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? 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 |
![]() |
joelion, Create a local directory in templates (modules/map/templates/local) <!-- Google Maps script --> <script src="http://maps.google.com/maps?file=api&v=1.28&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&v=1.28&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 |
![]() |
Termite, 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 |
|
conorboyd
Joined: 2005-03-29
Posts: 166 |
![]() |
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. 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 |
![]() |
conorboyd, 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 |
![]() |
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. Termite, you have outdone yourself. You think it's cool -and- I'll look about for some more track files when I get a chance (so you have more than three ;-) ) |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
galmoid wrote:
I have been messin' around with permissions and found I ran into problems 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
conorboyd wrote:
Hi guys, 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! 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
galmoid wrote:
Termite, you have outdone yourself. You think it's cool -and- 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
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 |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
Termite, |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
galmoid wrote:
Termite, 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
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
The tracklog adventure continues 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 !! ------------------------- |
|