Google Maps + Gallery
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
djrm2 wrote:
These thee additional lines in modules/map/MapSiteAdmin.inc lines 223 to 225 have broken the marker generation for me, removing them made it work again. When you keep these lines, what is the content of the variable $base for you ? |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
Quote:
When you keep these lines, what is the content of the variable $base for you ? $base=/gallery2/ n.b. see the crazy hue numbers I'm using, not right yet but better for me than the defaults. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
All right, here is a new module 0.3 which should fix all problems and does not need to copy the GxMagnifier files at the root. It uses the ones directly on the module directory. One More thing I have to correct is the CustomEditItem.tpl but for now there is no solution to alter the page without changing the template. Maybe someday I will find another way to change this :-D Hopefully this will work without modification of the code for everyone (embbeded or not, with gallery in the web directory or not) Let me know EDIT:I've made a couple changes coz there was something weird about the path for the GxMagnifier Tool ... --------------------- |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
Quote:
EDIT:I've made a couple changes coz there was something weird about the path for the GxMagnifier Tool ... Second time lucky then , it works. One more thing I forgot to mention. When using GxMagnifier on old or new versions with ie then the contents of the magnifier are blank. In firefox 1.0.7 the magnifier has the expected map contents. Another thing, I checked the map on an old win98 PC and it reported this error and would not render the map page at all. ie5.5 no firewall, no antivirus, no nat. The basemarker files have improved, the new file marker.png produces various colours though the man.png still makes all red men. I enabled XHTML checking on my site and the map page produces eleven errors on two lines. hth Dave edit: Error: http://host/gallery2/main.php?g2_view=map.ShowMap#: ReferenceError - Can't find variable: GMap |
|
makro
![]()
Joined: 2005-10-10
Posts: 12 |
![]() |
Termitenshort: |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
Regarding GxMagnifier...quoted from the site, And Google Maps support (from the FAQ): Google Local currently supports the following web browsers: Judging by the Google map furum, 'some' versions of IE5.5 will not work. Run a search "IE 5' on the map forum to see for yourself. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Well I guess there is better success finally I'm still putting some comments in the code and then I have a few (simple) things I would like to add to the GxMagnifier (basically most options available) I'm going to do some more research with the ImageMagick, djrm2 which version are you using ? Maybe the base color needs to be closer to the red on the new marker instead of the "pinkish" thing I got from the other site .... See you |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
I tried to make the color of all markers as close as possible to the new marker, here they are. Let me know if those work better and also if they function with older verion of ImageMagick (older than 6.2.2) I'm going to be looking at other toolkits when the code commenting and the GxMagnifier options are in ... ------------------------- |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Termitenshort, Can you mock up some code so I can see how it is done then I bet I can Thanks Dave ____________________________________________________ |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
//setup the directory $mydir = dir($basegallerydir.'modules/map/controls/'); //Loop trhough all file and folder in the directory while (($file = $mydir->read()) !== false) { //if the "file" is a folder and isn't "." or ".." then proceed with it if ((is_dir($basegallerydir.'modules/map/controls/'.$file)) and (substr($file,-1) <> ".")) { //if the variable "controllist" already exists, just input our "option" statement to it if (array_key_exists('controllist', $form)) { $form['controllist'] = $form['controllist']."<option value='".$file."' "; //if the current "folder" is the same as the variable "control" it must be selected then if ((array_key_exists('controllist', $form)) and ($form['control']==$file)) $form['controllist'] = $form['controllist']."selected"; $form['controllist'] = $form['controllist'].">".$file."</option>"; } else //if it doesn't exists, create a new empty variable with our "option" statement { $form['controllist'] = "<option value='".$file."' "; if ((array_key_exists('controllist', $form)) and ($form['controllist']==$file)) $form['controllist'] = $form['controllist']."selected"; $form['controllist'] = $form['controllist'].">".$file."</option>"; } } } //Just make sure anything got created, if, not return an error that there is no control available if (!array_key_exists('controllist', $form)) {$form['nocontrols'] = 'There is no control available';} Here you go :D Also you will need to set the variables (controllist and control) in module.inc, ShowMap.inc and MapSiteAdmin.inc just for it to have default (empty is ok). you can follow what I have done with "usemarkerset" -> control and "markerset" -> controllist At the end you will have a variable $form.controllist which will be enclosed in the .tpl in <select> HTML balise. and will display the list of controls available according to folders in modules/map/controls/ (for example) Let me know if you need some more things to get it going. it seems to be very close to done Good job ! See you |
|
TheGoOse
![]()
Joined: 2002-12-31
Posts: 50 |
![]() |
Sorry for not trying latest changes, but I wasn't at home. I've tried the new version, and... now I can create markers, and they all have colors The problem is that the green marker is blue and the blue marker is green, and so :-S Great job, anyway ;) |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
TheGoOse wrote:
Sorry for not trying latest changes, but I wasn't at home. I've tried the new version, and... now I can create markers, and they all have colors LOOOL, well I guess an easy solution would be to switch the "modulate" values in MapSiteAdmin.inc ... is there more bizarre behavious as far as colors ? It's kinda annoying at this point that ImageMagick doesn't behave the same depending on the version. I'll be seriously looking into GD and others because that's not right :D Maybe we can do some sort of a survey ? Nick / Version of ImageMagick / OS / Colors (yes/no) / Correct Colors (yes/no) / Comments |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Ok I finish commenting the code so it would be easier for someone to makes some changes to it :D Before adding the GxMagnifier options, I was looking at NetPBM and GD and to be honest I have very little sucess at this point. GD requires php5 to be able to "colorize" a png file and the results are VERY weird ... NetPBM does not seem to change the pictures at all ... If anyone has success into changing a marker to different colors using one of those toolkit I would gladly accept the code In the mean time I'll be working tomorrow at adding GxMagnifier options and also start on the "theme" stuff for the InfoWindow display. See you !! |
|
Canuck249
Joined: 2005-10-24
Posts: 3 |
![]() |
Hello, I just got around to fooling about with G2 and came across this discussion. I have a version of the Maps running at home locally - very coool indeed, but I want to be able to zoom and change the color of the pins - which seems possible - but not in the version that I have - I don't think so anyway. I also want to start playing around with the code, but I am not sure that I have the latest. I was wondering if there is a zip file available with the entire theme and add ons? Every time I try to download and unzip one of the posted attachments here, I get that it is an invalid zip file? Thanks and Regards, Canuck |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
Validation results for map-module-0.3.0: Need to mention that due to embedded mode using WP I must add the below closing tags in ShowMap.tpl after line 23 otherwise I get the operation aborted error in IE6. The same also applies to GPSMap.tpl. This is seems to be due to the Google javascript map code must be run outside any DIV and <table> for IE. Firefox is more lax and allows the code to execute. </div> </td> </tr> </table> If you'll be adding GD support then similar to Imagemagick (not all have it installed or able to install it) I don't think everybody has GD support compiled into PHP. Either way, Maybe add a radio/checkbox option on the Markers Creation Tool page to choose Imagemagick or GD.? Great work Termite! |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
Canuck249, |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Thanks for the info swordfish, for me the orange is a bit redish as well and the yellow is actually orange. I think it's because I changed the base color of the marker compare to the one I'v grabbed from the wensite where I got the code to "convert" I'll be changing that soon, it's rather easy. For the toolkit selection I wanted to have a radio to select the toolkit to use for the marker creation but at this point I'm not able to get either GD or NetPBM to work For the time being I will work on more simpler stuff. just as a reminder I have: What's left to do See you ! |
|
dogdog
Joined: 2005-06-10
Posts: 37 |
![]() |
Termitenshort wrote:
|
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
dogdog wrote:
Below is my URL http://k-one.no-ip.org/gallery2/main.php?g2_view=map.ShowMap. I have added a testing marker on London. Thanks for your help! I get an error when I try to get to the URL you provided |
|
dogdog
Joined: 2005-06-10
Posts: 37 |
![]() |
Hi Termitenshort, That's the correct URL: http://k-one.no-ip.org/gallery2/main.php?g2_view=map.ShowMap DOGDOG |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
dogdog wrote:
Hi Termitenshort, It still seems that ImageMagick is not creating the icon, they are not there basically ... If you are using windows for your server, you need a reboot after ImageMagick installation for it to work with PHP/Apache (don't ask me why I just know that it fixed my problem after fumnbling around for 2h) It you are not using windows, you shoudl check that "convert" is in the path, for that just type "convert" in the command line (from the web directory for example) and see if it shows you convert help or an error message. At this point, it's pretty clear to me that "convert" isn't working for you. your install seems perfectly fine for me, it's just a matter of getting ImageMagick to perform |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
Greetings DOGDOG If you cannot get imagemagick to work for you to create the pushpin markers then you could use these readymade ones by unzipping and then and copying them into the <name> directory under gallery2/images/map , where <name> is the name you give the set http://gallery.menalto.com/files/map-marker-20.zip beware that the files in the zip archive have lower case colour names and the map module is expecting upper case colour names so you may need to rename the files before copying them. You will need to make the files have names using the following template: hth Dave |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
There is a difference in the bahaviour of the GPSmap utility depending upon wether it is used from ie6 or Firefox. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Termitenshort, Dave ____________________________________________________ |
|
billimek
Joined: 2005-04-13
Posts: 10 |
![]() |
Quote:
What's left to do I've tried and failed to add the ability to have the map resize automatically to the hight of the viewable space in the browser. I was able to get it to sucessfully resize to fit the width, but not the height. Would anyone be willing to try to tackle this problem? I poured over the google maps groups discussions and looked at samples but was not able to acheive automatic height resizing. Thanks, |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
billimek wrote:
To be honest I'm not quite sure that it's do-able, the only thing that I can think of is to write a code that would grab the current size of the windows and do some math to make the height a percentage of what's left after the bar up top. It sounds like quite some work, HTML is designed to adjust horizontally but since it's ok to scoll down, it's not really meant to stick to a specific height. Other than that, I know it's do-able because when gallery is used embedded it resizes evrything to fit ... See you ------------------- |
|
dogdog
Joined: 2005-06-10
Posts: 37 |
![]() |
Quote:
Greetings DOGDOG Hi Dave, Thanks a lots! It's work now! Thanks again! dogdog |
|
billimek
Joined: 2005-04-13
Posts: 10 |
![]() |
Termitenshort wrote:
What's left to do I have a couple of other quick suggestions: Add map.registerKeyHandlers( window ); to ShowMap.tpl in order to give the users keyboard navigational abilities (i.e. use the arrow keys to move the map and the plus & minus keys to zoom in & out) Also, the zipfile you provide for the module contains all lower-case filenames which breaks in the unix world since some of the files/directories are beign referenced as mixed case. For example. The zipfile contains showmap.tpl but it is being referencd as ShowMap.tpl. The GxMagnifier icon seems to get overlaied by the map controls whenthe map size is set to small, despite what the GxMagnifier documentation states. A Workaround is to use a large mapsize or none at all. Below is a diff to add the ability to change the width from a fixed-pixel size to whatever the browser width is: ../ShowMap.tpl ShowMap.tpl 23c23 < <div id="map" class="gbBlock" style="width: {$map.mapWidth}px; height: {$map.mapHeight}px; color:black;"> --- > <div id="map" class="gbBlock" style="width: 98%; height: {$map.mapHeight}px; color:black;"> ../Header.tpl Header.tpl 14c14,21 < --- > {literal} > <!-- Make the document body take up the full screen --> > <style type="text/css"> > v\:* {behavior:url(#default#VML);} > html, body {width: 98%; height: 98%} > body {margin-top: 0px; margin-right: 0px; margin-left: 0px; margin-bottom: 0px} > </style> > {/literal} I really wish there was an easy way to get away from a fixed-height map any into something a little more dynamic! I've incorporated the above changes into my gallery map at http://billimek.com/jeff/gallery/map Thanks, |
|
makro
![]()
Joined: 2005-10-10
Posts: 12 |
![]() |
billimek wrote:
Below is a diff to add the ability to change the width from a fixed-pixel size to whatever the browser width is: wow, that's great - thanks! |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Thanks Jeff for all these comments I'm gonna start working on the lowercase/mixed case deal. it's surprising that you see this behaviour, i'm using linux for my server and everything seems to work fine. But I will look at it to make sure everything is squared away. I'd love to add the KeyNavigation deal, I didn't it was available even I was so concentrated on adding some other stuff. i'll be getting that in asap. Also I will keep your changes for the fixed width/height coz it's on my todo to have the possibility to have a %age instead of fixed number. Like I said before I know it's possible and as a matter of fact i found the property in JS that has the height and width of the window so it should be fairly easy to add this in Thanks ! ------------------------- |
|
DDM
Joined: 2005-09-30
Posts: 7 |
![]() |
Jeff, that's the exact modification I've been waiting for. Most of my family is stuck in 1024x768 or worse. What's a good command for diff'ing in unix/linux land? It's one of the many commands I'm still not familiar with. Then again, I may just wait until this is incorporated into the map module. (please} Also, what's a good way of adding a link to the map next to the Gallery link in the upper-left (Matrix with default settings) -Jeff (also named Jeff) |
|
igrcic
![]()
Joined: 2005-04-19
Posts: 78 |
![]() |
Hi guys! Tnx for this beatiful module Read this forum many times but still gotta one question. I installed latest module and it works perfectly, also enabled short url, Problem comes when im trying to use map theme. any help is welcome, tnx again |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
igrcic, Dave |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
DDM wrote:
SOLUTION A: When this is done you can modify the file in the local folder without breaking anything and it's easy to go back to the default version. In the file just after This line can be added anywhere and would just show a simple link that would display your map. SOLUTION B: When I click on vacation picture it shows my map. the only thing I did is that I added the following line to my .htaccess in the /galllery2/ directory The beginning is showing that the name of my folder is /gallery2/v/map/. => you need to enable URL rewrite to get this to work, but it's fairly easy to do. You can choose whichever one you prefer |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Well like we discussed I have slown down the developpement but that doesn't mean nothing is being done Here is version 0.3.1 of the module, change: Here you go EDIT: re-attached to crrect version number ------------------------- |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
billimek wrote:
the zipfile you provide for the module contains all lower-case filenames which breaks in the unix world since some of the files/directories are beign referenced as mixed case. For example. The zipfile contains showmap.tpl but it is being referencd as ShowMap.tpl. This could be a problem with the program you use to unzip the file. indeed after checking the files in the zip are mixed-Case like they are in the code and it doesn't seems to be any descrepencies so far. If you get the files all lower case after unzip my guess is that something is wrong with the tool you use to unzip ? let me know |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Termitenshort wrote:
Well like we discussed I have slown down the developpement but that doesn't mean nothing is being done I should have the navigation / panning done this weekend as well. You will be able to select from a bunch of different options to the nav/panning. Dave |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
If you look at the bottom left hand corner of the map in the following link, just to the right of the Google logo, then you will see a handy scale graph. I have no idea how this is produced but it would be a handy addition the the map module. Does anybody know how to set file and user permissions to ensure that the map module is properly installed? I find I have to manually copy the CustomFieldItemEdit.tpl when I install or upgrade the module, I do this using a remote shell. One way in which the map module could be made more varsatile would be to be able to select or limit the image galleries which were searched to show the markers. This would make it more like the map theme. n.b. I too cannot get the map theme to work without generating google authentication errors, but it works nevertheless. Two remaining problems with the module are a) Clicking on 'zoom in' when embedded in drupal does not work, the link becomes http://host/drupal/# rather than http://host/gallery2/main.php?g2_view=map.ShowMap# b) the zomm in link does not work properly in Firefox. Gallery shows the previous map module as being 0.3.0 and this one 0.3 though the downloaded zip archive is labled 0.3.1 What is the reccomended method to upgrade the map module? I de-activate the old one, then remove it. Then copy the new module onto the server and upgrade/activate it. I think the settings need saving after this process. One time I removed the old module but then I had to enter the settings from scratch - including the google key. hth Dave. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
djrm2 wrote:
If you look at the bottom left hand corner of the map in the following link, just to the right of the Google logo, then you will see a handy scale graph. I have no idea how this is produced but it would be a handy addition the the map module. Added ! It's a built-in function to the API I was actually surprise no-one ever requested to add that. I will also make a adminpanel entry to enable/disable it |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
djrm2 wrote:
Does anybody know how to set file and user permissions to ensure that the map module is properly installed? I find I have to manually copy the CustomFieldItemEdit.tpl when I install or upgrade the module, I do this using a remote shell. The Apache user need to have right to write to the folder where the gallery is installed, when you install it under /var/www it's easy. you need to do a ls -l to check who is the owner and which group has rights to it, then you can add the apache user to that group and then do a chmod g+w on the folder (/gallery2/modules/CustomEditField/templates/local/) See you ------------------ |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
djrm2 wrote:
One way in which the map module could be made more varsatile would be to be able to select or limit the image galleries which were searched to show the markers. This would make it more like the map theme Yep I'm working to figure that out and I see 2 solutions at this point: Which one do you guys prefer ? |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
djrm2 wrote:
Gallery shows the previous map module as being 0.3.0 and this one 0.3 though the downloaded zip archive is labled 0.3.1 Sorry about that it's my mistake i'll re-upload with the change. if anyone want to change it manually, it's located in the module.inc file the version is displayed there, changing the line cause the module to be uninstalled and show up as an "upgrade" $this->setVersion('0.3.0'); Should be $this->setVersion('0.3.1');
------------------ |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Some today changes 2005-10-27: (ehd) Changes: I will add a couple more things (for GxMagnifier) before the week-end but I will wait to upload the next version until we have a "theme" feature for the controls :D What's left to do See you ! ------------------------- |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
Termite, Thanks for the map-module update! Checkout Amazon's (beta) AJAX powered map site. Click on a city, then move the big magnify icon around the map and watch what happens. Damn, thats so cool! http://maps.a9.com/ Some AJAX developer resources: |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
I wonder what the qualifications will be to have user contributed modules added to the G2 Repository EDIT: I discovered this after updating from latest cvs. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
OK I have the dropdown of the various navigation/panning controls working on the admin page. The trouble I have is the mixing of php, smarty and javascript. How does one include a php file in smarty tags that will also call another file? Thanks in advance for the education. Dave ____________________________________________________ |
|
gowdy
Joined: 2005-10-27
Posts: 18 |
![]() |
I've just installed version 0.3.1 and it works really well... once I'd figured out it was the longitude and lattitude in the opposite order to what google uses. BTW, I found this useful page for working them out; |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
gowdy, Err, I just realized that feature was taken out due to the module replacing a few G2 theme template files. |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
swordfish wrote:
gowdy, Swordfish, I think you are wrong here, I'm pretty sure it was the 'go back to the map' link which was removed, although I left it in anyway. The "Get via a map" relies on the GPSmap.* files in the module. As you mentioned before the "Get via a Map" does indeed show co-ordinates and automatically puts them into the GPS custom field when editing an album or photo. It is very handy too. Dave |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
Termitenshort wrote:
Some today changes Termite, I was just looking in the download archive to check for changes and to my suprise some of the files were dated 27/01/2006 ! |
|