Google Maps + Gallery
igrcic
![]()
Joined: 2005-04-19
Posts: 78 |
![]() |
Termitenshort wrote:
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&v=1&key={$theme.param\ s.GoogleMapKey}" type="text/javascript"></script> ...tried it before, the same thing request/idea...what about using different marks on same map? Ability to choose mark type when entering coords? |
|
jcampbell1
Joined: 2005-10-26
Posts: 8 |
![]() |
ninjainvasion wrote:
Hi, I don't think this is related, but I get an error with the new module. Mine craps out and gives an error about the header. The solution I have found is to delete the last two blank lines from ShowMap.inc and MapSiteAdmin.inc. Hard to believe that does anything but it solves the problem. |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
Upgraded from 0.3.2 to latest (actual from cvs as of 7pm PST today) and viewing my map I have no markers displayed and a nice error message at the top of page Warning: array_unique(): The argument should be an array in /var/www/localhost/htdocs/gallery2/modules/map/ShowMap.inc on line 46 I followed the wiki for upgrading. EDIT: I just noticed by editing an image I had linked to the map has the Custom tab with entries still present and on the Google Map tab all entries are blank. I thought they supposed to have been automatically carried over.? Do I now have to manually update them all for the Google map tab? |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
EDIT 2: Well, I don't know what happened but the error cleared itself. Still have no markers unless I manually copy over the coordinates from Custom tab to Google map tab. Thanks! |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
Hi, I modified the ShowMap.tpl a little bit to have a more compact JavaScript to produce the markers. The result should be exactly the same (if I made no errors), but the download of the map page should be a little bit faster. The changes are:
It works fine on my site, but it would be cool if somebody else could also test it. I attach the ShowMap.tpl (zipped) to this message, simply overwrite the old one in the modules/map/templates directory in order to test it. Please comment! ------ |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
ninjainvasion, |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
swordfish wrote:
I noticed my G2 mysql database has two tables named g2_mapmap and g2_mapMap. All my coordinates are in the g2_mapmap and when I copy them over to the Google map tab they are written to the g2_mapMap table. I think this is Termitenshort's favorite bug... sometimes capitals, sometimes not - you never know ------ |
|
kwick60073
Joined: 2005-11-09
Posts: 8 |
![]() |
Tried you modification ... It doesn't display a map and I get several errors in apache log about undefined index GxZoom. See below. Quote:
[client 24.13.51.65] PHP Notice: Undefined index: GxZoom in /home/kenny/public_html/gallery2/modules/map/ShowMap.inc on line 274, referer: http://www.lexnik.net/~kenny/gallery2/main.php There are similar errors for GxZoomNum, GxSize, GxSizeX, GxSizeY, GxPan and GxAutoPan. I am using Gallery2 and map 0.4.1. For now, I have backed your change out. Let me know if you need additional info. |
|
kwick60073
Joined: 2005-11-09
Posts: 8 |
![]() |
I reverted back to my previous ShowMap.tpl and I still have the same problem! Kenny |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
igrcic wrote:
request/idea...what about using different marks on same map? Ability to choose mark type when entering coords? Sure sounds easy enought to do ... we also need a "default" setting in case someone did not select one. I'm gonna put a Feature request/idea section in the wiki :D |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
jcampbell1 wrote:
I don't think this is related, but I get an error with the new module. Mine craps out and gives an error about the header. The solution I have found is to delete the last two blank lines from ShowMap.inc and MapSiteAdmin.inc. Hard to believe that does anything but it solves the problem. I have seen this happening 3 times to me already ... I dunno if it come from the zipping or the fact that the files are going to CSV ... I'm confused it used to not happen before |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
swordfish wrote:
EDIT 2: Well, I don't know what happened but the error cleared itself. Still have no markers unless I manually copy over the coordinates from Custom tab to Google map tab. hmmm ... well you could export the "data" part of g2_mapmap and import it to g2_mapMap so you wouldn't have to copy/paste manually everything. Everywhere in the code i refer to mapMap but it was the same with customfield .... I just follow the same thing. I thought it was kinda weird but I also believed that it might be normal ... Maybe you Mysql is case sensitive ? I'm not too sure. I'll check something |
|
galmoid
Joined: 2005-11-07
Posts: 364 |
![]() |
I find that this new ShowMap.tpl works just fine here. onclick="javascript:map.recenterOrPanToLatLng(new GPoint('+px+','+py +'));map.zoomTo('+zoomlevel+');">{g->text text="Zoom In"} in place of the 'centerAndZoom'. |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
swordfish wrote:
I noticed my G2 mysql database has two tables named g2_mapmap and g2_mapMap. All my coordinates are in the g2_mapmap and when I copy them over to the Google map tab they are written to the g2_mapMap table. I haven't found any reference to g2_mapmap (lowercase) in the code... is it possible that there was one in an earlier version which could have caused swordfish's database to have 2 different tables? ------ |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
kwick60073 wrote:
Tried you modification ... It doesn't display a map and I get several errors in apache log about undefined index GxZoom. See below. I think the modified .tpl shouldn't change the behavior of ShowMap.inc - but I'm not 100% sure, this is my first g2 template modification... Anyway, did you check if the fields that have problems (GxZoom, GxZoomNum, GxSize, GxSizeX, GxSizeY, GxPan and GxAutoPan) are correctly set in your database? And maybe if you also have two different tables, g2_mapmap and g2_mapMap? ------ |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
igrcic wrote:
request/idea...what about using different marks on same map? Ability to choose mark type when entering coords? Termitenshort wrote:
Sure sounds easy enought to do ... we also need a "default" setting in case someone did not select one. What also would be cool is to have a differnt marker set for albums and photos - I think it should be easy to add a second marker set setting in the admin. These admin settings could also be the "default" setting if choosing a different marker for every point is enabled. ------ |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
Greetings. Edit, Sorry I hadn't noticed the bit about Route Edit not being available. Where can I check if the route data has been entered properly? Dave. Oops, it seems that it is vital that a sequence number is entered when creating a route, I works now. sorry to trouble you. tahnks again, Dave. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
From the wiki: Quote:
edit route doesn't work! It just returns me back to a list of routes. ____________________________________________________ |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
kwick60073 wrote:
I reverted back to my previous ShowMap.tpl and I still have the same problem! Sometime when you change a template you need to go and delete the template cache I regularely have the issue .... |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
ninjainvasion wrote:
I haven't found any reference to g2_mapmap (lowercase) in the code... is it possible that there was one in an earlier version which could have caused swordfish's database to have 2 different tables? No that is not possible, I have not changed anything in the code after hte first time BUT, my instruction to upgrade from 0.3.2 to 0.4.1 where mentioning g2_mapmap and maybe that is where the wrong table got created .... Very likely |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
ninjainvasion wrote:
I think the modified .tpl shouldn't change the behavior of ShowMap.inc - but I'm not 100% sure, this is my first g2 template modification... You are aboslutely correct on that, modifying the .tpl does not affect the .inc see you |
|
kwick60073
Joined: 2005-11-09
Posts: 8 |
![]() |
That makes sense...it also explains why it just started working after a little while. All it working again, even with the modified ShowMap.tpl. New Question: With the recent improvements (0.4.1), the changes to album.tpl and photo.tpl don't seem to be needed anymore. Is this correct? If so, the info should be removed the the admin page and maybe a note added to the wiki. I'd be happy to contribute, but just wanted to double check be changing anything. Kenny |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
ninjainvasion wrote:
What also would be cool is to have a differnt marker set for albums and photos - I think it should be easy to add a second marker set setting in the admin. These admin settings could also be the "default" setting if choosing a different marker for every point is enabled. Even better, do you mind updating the wiki ? (http://codex.gallery2.org/index.php/Gallery2:Modules:Map), you should also put your name in the developer team coz I will add your change to the code permanentely (thx btw) |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
djrm2 wrote:
Edit, Sorry I hadn't noticed the bit about Route Edit not being available. Where can I check if the route data has been entered properly? Dave. The route appear on AdminPanel -> Route Management then it should show up on the map. If not I would like a copy/paste of the view source to check what's going on. The Routes are stored in the table called g2_pluginparamtermap, there are all the settings for the map module and one of them is called "ROUTES" this is wehere the routes are stored. EDIT: Also, sometime it happens to me that the route takes a little while to draw and that is due to the fact that they draw at the very end of the map loading ... everytile needs to be loaded before it starts drawing the polylines. It might be caused by the API or by the fact that the polilyne drawing is at the end of the file (not sure at this point) Let me know ! -------------------- |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
kwick60073 wrote:
New Question: With the recent improvements (0.4.1), the changes to album.tpl and photo.tpl don't seem to be needed anymore. Is this correct? If so, the info should be removed the the admin page and maybe a note added to the wiki. Hmm yeah of course ... i will do that now, should be quick enought |
|
voidtrance
Joined: 2005-10-21
Posts: 26 |
![]() |
Is it possible to have the maps show the zoom slider and center button that is usually between the four directional buttons? I have played with all the settings possible, enabled the GxMagnifier (which I don't really know what it is!!) and I can't seem to get them to show up. Thanx for your help! |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
voidtrance wrote:
Is it possible to have the maps show the zoom slider and center button that is usually between the four directional buttons? I have played with all the settings possible, enabled the GxMagnifier (which I don't really know what it is!!) and I can't seem to get them to show up. Yes if you choose "Stock - Large" in the theme tab, you can have the slider. GxMagnifier is basically a zoomed windows that is linked to your mouse and let you see a "zoomed" version at all time. See you |
|
voidtrance
Joined: 2005-10-21
Posts: 26 |
![]() |
Great! Thanx, it would have never occured to me that it could be there. I like this module more and more all the time. I guess, now I just need to start taking more picture and writing down where I took them |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Don't we all |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
kwick60073 wrote:
New Question: With the recent improvements (0.4.1), the changes to album.tpl and photo.tpl don't seem to be needed anymore. Is this correct? If so, the info should be removed the the admin page and maybe a note added to the wiki. Something else, I actually get a "Show Google Map" link for every item in every album view, although in my theme settings (matrix theme) I haven't selected to show "Google Map" or "Item actions". Is this a bug? Anybody (ie. Termitenshort ------ |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Is there a trick to removing the coordinates from an item (album / photo)? I can change them but not remove them. Dave ____________________________________________________ |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
floridave wrote:
Is there a trick to removing the coordinates from an item (album / photo)? I can change them but not remove them. This is currently reported as a bug in the wiki. For the moment I think you would have to delete the coordinates directly in the database. ------ |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
Something else that would be cool... if you already have coordinates entered but want to adapt them, it would be great if the "Grab coordinate from Map" feature would center and zoom to the current values (GPS coordinates and zoom level). (Added this to the To do list) ------ |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
floridave wrote:
Is there a trick to removing the coordinates from an item (album / photo)? I can change them but not remove them. that's a bug that I added when I had put some error control on the field ... I'll be fixing that. In the mean time you can go and edit the g2_mapmap table and just delete the entry you don't want to have :D |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
I had this problem where the route I created didn't show up. It must have been because I did not add any order numbers on my first attempt. On subsequent efforts I filled this in for every item and the routes now appear. This is tedious and prone to error - but it works. Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Termitenshort wrote:
that's a bug that I added when I had put some error control on the field ... I'll be fixing that. In the mean time you can go and edit the g2_mapmap table and just delete the entry you don't want to have :D Thanks, I guess I should read the wiki more often. ;-) I thought I read it yesterday but at the speed of this module even that would be late. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Igrcic has had a great idea: We should all upload a pic (a logo, a photo, anything really) on a gallery2 with our GPS coordinate (doesn't have to be exact, don't give up your address ...) Then a map would show where we all are !!! Wouldn't that be fun ? The map can then be seen here: http://termite.responsiveweb.com/gallery2/main.php?g2_view=map.ShowMap Thanks Igrcic for this really good idea and let's all upload a pic/photo/... See you ------------------------- |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
igrcic wrote:
...tried it before, the same thing Did you also try to delete your template cache ? coz in the code it was definitively using the cache... |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
galmoid wrote:
0.4.1 is looking really good. I have added this to the module and uploaded revision to the CVS, thx galmoid :D ------------------- |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Quote:
No markers visible View All Available MarkerSets in Google Map Admin doesn't show any markers Can I get more precision so I can fix this bug ? (I like view/source :D) ------------------------- |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Bug Fixing: * Cannot delete GPS coordinate from an album/photo -> change the preg_match * Cannot have 0 in ZoomLevel * HTTP 500 Error In some cases the glob() function of PHP errors out, it needs to have *.* instead of * Those are solved in the CVS. I will leave them in the wiki until I upload a new version See you |
|
ninjainvasion
![]()
Joined: 2005-11-05
Posts: 78 |
![]() |
Termitenshort wrote:
Thanks Igrcic for this really good idea and let's all upload a pic/photo/... Very good idea indeed, and thanks Termite for making the gallery available! Termitenshort wrote:
Can I get more precision so I can fix this bug ? (I like view/source :D) Sent you pm - I'll also try to find out what's going wrong, but later ------ |
|
FOBioPatel
![]()
Joined: 2004-07-25
Posts: 26 |
![]() |
voidtrance wrote:
Is it possible to have the maps show the zoom slider and center button that is usually between the four directional buttons? I have played with all the settings possible, enabled the GxMagnifier (which I don't really know what it is!!) and I can't seem to get them to show up. GxMagnifier doesn't appear unless you are logged into the gallery. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
FOBioPatel wrote:
GxMagnifier doesn't appear unless you are logged into the gallery. Bug added to the wiki |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
Termitenshort wrote:
|
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
swordfish wrote:
Sorry about that |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
Termitenshort wrote:
|
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
swordfish wrote:
Talking about odd ... I have had the problem and now it just disapear and I can't reproduce it |
|
igrcic
![]()
Joined: 2005-04-19
Posts: 78 |
![]() |
swordfish wrote:
Hmm, this is odd. I don't see this issue in IE nor Firefox (G2 embedded) and tried on 3 different machines. G2 standalone only? i cant confirm it.....it works nice for me for a long time now. not logged in. |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
I think a few folks reported the magnify icon for GxMagnifier does not center well (overlaps the up arrow) |
|