Google Maps + Gallery

Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2005-10-23 18:21
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.
$urlGenerator =& $gallery->getUrlGenerator();
$urlComponents = parse_url($urlGenerator->getCurrentUrlDir(true));
$base = $urlComponents['path'];

When you keep these lines, what is the content of the variable $base for you ?

 
djrm2
djrm2's picture

Joined: 2005-10-04
Posts: 54
Posted: Sun, 2005-10-23 18:27
Quote:
When you keep these lines, what is the content of the variable $base for you ?

$base=/gallery2/
$convert=convert "/usr/share/gallery2//gallery2/modules/map/basemarkers/marker_34_red.png" "/usr/share/gallery2/images/map/another/marker_ORANGE.png"

n.b. see the crazy hue numbers I'm using, not right yet but better for me than the defaults.

 
Termitenshort
Termitenshort's picture

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

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

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

 
djrm2
djrm2's picture

Joined: 2005-10-04
Posts: 54
Posted: Sun, 2005-10-23 20:19
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.
Line: 382
Char: 13
Error: 'GMap' is undefined
Code: 0
URL: http://host/gallery2/main.php? g2_view=map.ShowMap
it worked file in firefox.

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:
I have done som more testing on Knoppix, Firefox, Epiphany & Mozilla display the map (and magnifier) page but Konqueror shows this error and no map (same error as ie 5.5)

Error: http://host/gallery2/main.php?g2_view=map.ShowMap#: ReferenceError - Can't find variable: GMap

 
makro
makro's picture

Joined: 2005-10-10
Posts: 12
Posted: Sun, 2005-10-23 21:59

Termitenshort:
the new version from 2005-10-23 20:51 works fine now for me, beside the zoom-in-link.
When i click it, i get just back to my Joomla-Mainpage, but that's not really a problem for me ;)

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sun, 2005-10-23 23:59

Regarding GxMagnifier...quoted from the site,
Browser Compatibility
The control has been loosely tested in Microsoft Internet Explorer 6.0 and Mozilla Firefox 1.0.4. Since this was done entirely in my free time, and I don't have any free time, I anticipate issues will be raised (and hopefully addressed) in the forum.

And Google Maps support (from the FAQ):
* IE 5.5+
* Firefox 0.8+
* Safari 1.2.4+
* Netscape 7.1+
* Mozilla 1.4+
* Opera 8+

Google Local currently supports the following web browsers:
IE 6.0+
Firefox 0.8+
Safari 1.2.4+
Netscape 7.1+
Mozilla 1.4+
Opera 8.02+

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
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-10-24 00:30

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
-------------------------
The Termite :-)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-10-24 01:37

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

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-10-24 04:26

Termitenshort,
I am trying to figure out how to have a dropdown like you have for the
"Select a set of markers:" . What I need is a dropdown of directories in the
/theme/map/templates/control/*.*
I have a bunch of directories with various controls.
Then when selected it gets saved to the DB and can be called by the map code.
This variable should then be able to be "seen" from the photo.tpl file.

Can you mock up some code so I can see how it is done then I bet I can
finnish this control theme. I am just getting lost.....
G2 is very different than G1.
It seems that a few files have to be changed and I don't have enough G2 experiance to go the next step.

Thanks

Dave

____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-10-24 05:13
          //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
-------------------------
The Termite :-)

 
TheGoOse
TheGoOse's picture

Joined: 2002-12-31
Posts: 50
Posted: Mon, 2005-10-24 05:26

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
http://www.ganso.org/gallery/images/map/GansoMarkers12x20/marker_BLUE.png
http://www.ganso.org/gallery/images/map/GansoMarkers12x20/marker_GREEN.png

Great job, anyway ;)

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-10-24 05:35
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 :)

The problem is that the green marker is blue and the blue marker is green, and so :-S
http://www.ganso.org/gallery/images/map/GansoMarkers12x20/marker_BLUE.png
http://www.ganso.org/gallery/images/map/GansoMarkers12x20/marker_GREEN.png

Great job, anyway ;)

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
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-10-24 07:14

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 !!
-------------------------
The Termite :-)

 
Canuck249

Joined: 2005-10-24
Posts: 3
Posted: Mon, 2005-10-24 07:15

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
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Mon, 2005-10-24 07:27

Validation results for map-module-0.3.0:
Using G2 2.0.1/WP 1.5.2/WPG2 1.0 plugin, Imagemagick 6.2.2.3
Fresh install = Pass
Upgrade/Activate = Pass (no errors on screen nor Apache error.log)
Browsers IE6 & Firefox 1.0.7 = Pass, same look n' feel, no errors
Color markers = Yes
Correct Colors = Yes (the Orange marker to me looks more like a light shade of red. See attached screenshot.
Course it could be my eyes)
Also, notice the magnify.png and up arrow icons for some reason are not aligned right.

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.
One solution according to the WP forums is to put the map code in the WP footer.php. However, adding the below tags seems to be alot simpler and no editing of WP files necessary.

</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
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Mon, 2005-10-24 07:32

Canuck249,
Please use Firefox to download any zip files in these forums and you'll have no problems.
The latest map-module is map-module-0.3.0.zip
Look for frequent updates posted by Termitenshort.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-10-24 14:41

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
- Add more option to the admin panel to customize GxMagnifier
- Add an error message when a MakerSet is created and the name is already in use
- Add an upload button to upload new "base icon"
- Add a view all markerset button (like for the frames) to view what's created.
- Add the creation of the icon with characters using the default UTF characters set
- Maybe add a section where you select if you want all the characters or not or no characters.
- Add a theme feature to choose the window styles
- Add the posibility to change the map control style (floridave)
- Add a theme feature to choose the map control style (floridave)
- Ability to autopopulate the custom GPS field based on EXIF tags for photos
- Enable possibility to have different MAPs per Album
- put a "go back to the map" link on pictures and albums (removed at this point, can be added manually)
- Add posibility to create a legend
- Open for more?

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

 
dogdog

Joined: 2005-06-10
Posts: 37
Posted: Tue, 2005-10-25 03:52
Termitenshort wrote:
dogdog wrote:
Hi Termitenshort,

Thanks for your reply. I have installed imagemagick and worked fine in my gallery. I also found that in the map, it can show the "shadow" of the marker and when I click the "shadow" , the album can appear! Now just dono why can't shown the "real" image of the marker! Sorry for disturb your time again!

Dogdog

Quote:
My apologies for not answering I just saw your message burried in many others !! :-)

You seem to have a problem with the way your gallery is installed compared to my test environements :(

Can you tell me what is your install path ? (/gallery2/ or /gallery/ or ...)

Hi Termitenshort,

I have installed the latest version 0.3. But the problem still exist. On my map just can shown the "shadow" marker but not the coloured one. When I try to generate marker, it also prompt me " Unknown error creating the markers!" But on the page of "Theme Setting", I can see the marker has been generated. 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!

dogdog

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-10-25 04:07
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!

dogdog

I get an error when I try to get to the URL you provided :(

 
dogdog

Joined: 2005-06-10
Posts: 37
Posted: Tue, 2005-10-25 04:27

Hi Termitenshort,

That's the correct URL: http://k-one.no-ip.org/gallery2/main.php?g2_view=map.ShowMap

DOGDOG

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-10-25 14:01
dogdog wrote:
Hi Termitenshort,

That's the correct URL: http://k-one.no-ip.org/gallery2/main.php?g2_view=map.ShowMap

DOGDOG

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
djrm2's picture

Joined: 2005-10-04
Posts: 54
Posted: Tue, 2005-10-25 17:00

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:
marker_<COLOUR>.png , where <COLOUR> is the name of the colour of the marker.
Also the file colourlist will need to be in the directory (but you already have that) just check taht its contents matche the colours of the pushpin files you have, and edit it to suit.

hth Dave

 
djrm2
djrm2's picture

Joined: 2005-10-04
Posts: 54
Posted: Tue, 2005-10-25 17:28

There is a difference in the bahaviour of the GPSmap utility depending upon wether it is used from ie6 or Firefox.
In ie6 a double click creates a marker and then centres the map on the new marker. In firefox a double click creates TWO markers one on top of the other and also centres the map onto the new markers. You can verify this by single clicking to remove the markers, it takes two single clicks to remove the markers using Firefox, you can also see a thicker shadow. I discovered this while investigating the 'zoom in' link problem. I wonder if it due to something similar.
Dave.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-10-26 04:27

Termitenshort,
Thanks for the code. It helps. This is a big learning curve for me.
I have not gaven up.... I have been very busy with other stuff (kids)... I hope to finish by this weekend.

Dave

____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
billimek

Joined: 2005-04-13
Posts: 10
Posted: Wed, 2005-10-26 15:18
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,
Jeff

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-10-26 16:24
billimek wrote:
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,
Jeff

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

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

 
dogdog

Joined: 2005-06-10
Posts: 37
Posted: Wed, 2005-10-26 17:33
Quote:
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:
marker_<COLOUR>.png , where <COLOUR> is the name of the colour of the marker.
Also the file colourlist will need to be in the directory (but you already have that) just check taht its contents matche the colours of the pushpin files you have, and edit it to suit.

hth Dave

Hi Dave,

Thanks a lots! It's work now! Thanks again!

dogdog

 
billimek

Joined: 2005-04-13
Posts: 10
Posted: Wed, 2005-10-26 19:23
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,
Jeff

 
makro
makro's picture

Joined: 2005-10-10
Posts: 12
Posted: Wed, 2005-10-26 20:18
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
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-10-26 22:10

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 !

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

 
DDM

Joined: 2005-09-30
Posts: 7
Posted: Thu, 2005-10-27 02:08

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
igrcic's picture

Joined: 2005-04-19
Posts: 78
Posted: Thu, 2005-10-27 06:04

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,
so my map can be found at http://mysite/gallery2/v/map . I generated google key from my host address http://open.geof.hr
and it works nice with module.

Problem comes when im trying to use map theme.
As long as i know, using module one can have only 1 map, the one that it set as shorturl. Am I right? But using map theme
one can have as many maps as he wants. Now Im not sure which items show up, only items in current album, or all items that have GPS data.
Anyway, I created one album and set map theme 1.0.2 for it. But errors for API key comes up and there is no GoogleMap in the album. Can you take a look
at http://mysite/gallery2/v/GoogleMap .

any help is welcome, tnx again

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-10-27 13:32

igrcic,
If you look at your source of the theme you will see that the map API key is not in the JavaScript. That is where I woud start to look.

Dave
____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-10-27 14:51
DDM wrote:

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)

SOLUTION A:
In order to do that you need to create a local folder under gallery2\modules\core\templates\blocks\ and then copy the file called BreadCrumb.tpl into that folder (don't move it, just copy)

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
<div class="{$class}">
you can add a line:
<a href="{g->url arg1="view=map.ShowMap"}">Show me the map</a> >>

This line can be added anywhere and would just show a simple link that would display your map.

SOLUTION B:
Another solution is to use URL remaping I personnaly have an album called "vacation picture" and when you click on it it goes to the map. so on the top left I have gallery > vacation pictures > etc ...

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
RewriteRule ^v/map/$ main.php?g2_view=map:ShowMap

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
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-10-27 15:00

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:
- Added Options for GxMagnifier
- moved GxMagnifer options to a different tab
- added a link to view all the marker created
- added the "keylistener" for both maps (thx billimek - Jeff)

Here you go :-)

EDIT: re-attached to crrect version number

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-10-27 15:02
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
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-10-27 18:08
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.
Is there any site that springs to anybody’s mind for more inspiration in this area?

Dave

 
djrm2
djrm2's picture

Joined: 2005-10-04
Posts: 54
Posted: Thu, 2005-10-27 18:53

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.
http://www.robogeo.com/latlonfinder/map.asp
The above map also does a half decent job of resizing to the current browser area.

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
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-10-27 19:17
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
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-10-27 19:26
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.
If you have it in a different folder (which I believe is your case if I remember correctly),

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

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-10-27 19:29
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:
- rely on the file structure i.e. only show subfolder and group it by parent folders
- Add a customField called "Group" and manage this group membership in the module

Which one do you guys prefer ?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2005-10-27 19:32
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');

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

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2005-10-28 00:29

Some today changes

2005-10-27: (ehd) Changes:
- Added Upload button for the "basemarkers"
- Added the Show Scale option
- Added Help to setup the "back-to-map" feature

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
- Add more option to the admin panel to customize GxMagnifier
- Add an error message when a MakerSet is created and the name is already in use
- Add the creation of the icon with characters using the default UTF characters set
- Maybe add a section where you select if you want all the characters or not or no characters.
- Add a theme feature to choose the window styles
- Add the posibility to change the map control style (floridave)
- Add a theme feature to choose the map control style (floridave)
- Ability to autopopulate the custom GPS field based on EXIF tags for photos
- Enable possibility to have different MAPs per Album
- Add posibility to create a legend
- Add the percentage based size for the map (height and width)
- Open for more?

See you !

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

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-10-28 02:54

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:
http://www.ajaxian.com/
http://prototype.conio.net/
http://script.aculo.us/

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-10-28 04:35

I wonder what the qualifications will be to have user contributed modules added to the G2 Repository
once this feature is complete? I'd assume code review by G2 dev team and some unit tests would be required.
Be cool to have the map-module added to it.
See attached screenshot.

EDIT: I discovered this after updating from latest cvs.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-10-28 04:54

OK I have the dropdown of the various navigation/panning controls working on the admin page.
Now to implement it in the showMap.tpl file.....

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?
Example: in ShowMap.tpl I want to call a file: /map/templates/controls/control.tpl
That file will in-turn call; /map/templates/name of control.tpl
the name of control is a variable called $map['MapControlType'] and can be called from /map/templates/ShowMap.tpl successfully.

Thanks in advance for the education.

Dave

____________________________________________________
Gallery Frames / Mods || G1 Test Gallery

 
gowdy

Joined: 2005-10-27
Posts: 18
Posted: Fri, 2005-10-28 07:19

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;

http://www.naffis.com/maphacks/latandlon.html

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-10-28 07:50

gowdy,
If you use the link "Get via a Map" under your Custom Fields tab then you don't have to surf off to another site to figure out the Lat/Long. This makes plugging in the lat/long coordinates all automatic for you.

Err, I just realized that feature was taken out due to the module replacing a few G2 theme template files.
I think Termitenshort will include instructions on how to manual add the link for those who want it in an upcoming map-module update.

 
djrm2
djrm2's picture

Joined: 2005-10-04
Posts: 54
Posted: Fri, 2005-10-28 12:47
swordfish wrote:
gowdy,
If you use the link "Get via a Map" under your Custom Fields tab then you don't have to surf off to another site to figure out the Lat/Long. This makes plugging in the lat/long coordinates all automatic for you.

Err, I just realized that feature was taken out due to the module replacing a few G2 theme template files.
I think Termitenshort will include instructions on how to manual add the link for those who want it in an upcoming map-module update.

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
djrm2's picture

Joined: 2005-10-04
Posts: 54
Posted: Fri, 2005-10-28 12:59
Termitenshort wrote:
Some today changes
2005-10-27: (ehd) 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 !
hth Dave