Member
Member
steve   2007-11-13, 11:59
#1

On the default theme the meta data is displayed in a popup 'thickbox' which is pretty cool but what I would like to do if possible is have the google map (when photos have been geotagged) to work in the same way. It would keep the functionality but save space on the layout. Is this possible at all?

I think this is the default theme code that calls the metadata popup box...how would I modify it to get it to work?

`
Developer
Developer
trisweb   2007-11-14, 00:18
#2

Great idea, please submit this as a feature request in the ticket system...

http://www.zenphoto.org/trac/newticket

Thanks!

(I believe to get it working, just put the map in a DIV tag with an id like "imagegmap" and then use a link like Image Map -- the important part is the id of the DIV, match it to the inlineId in the link.)

Member
Member
steve   2007-11-14, 11:47
#3

Thanks for your reply Trisweb, I'll give it a go :-)

Ticket also submitted as requested.

Member
Member
steve   2007-11-14, 13:12
#4

I am having no luck here. I have tried many variations now and cannot get this to work, the best it does is open a thickbox with the correct dimensions but the contents are blank apart from a link to the url of the imagemap.

www.mydomain/my gallery/album/photoname#TB_inline?height=300&width=595&inlineId=imagegmap

Even clicking that does nothing so it seems to not be calling/outputting the map code. I noticed the small typo of 'imagegmap' in Tris's reply and corrected that.

My current code in image.php is
`

Image Map

`

I am sure I am missing something simple but my coding skills are limited. Any ideas gents?

Member
Member
steve   2007-11-16, 10:41
#5

Any further advice on this guys or will I just have to wait until it makes it into the code base?

Member
Member
aitf311   2007-11-16, 13:56
#6

I had the same problem you are describing when I tried this a little while ago.

Member
Member
steve   2007-11-17, 09:04
#7

Thanks for the feedback, at least I now know it wasn't just me being dumb

Member
Member
aitf311   2007-11-17, 18:17
#8

You can grab the exif coordinates and do the following: http://www.emich.be/en/2007/03/01/google-maps-lightbox/

Member
Member
spidge   2008-04-21, 15:46
#9

I've got this almost working (on the stopdesign theme, however).

I've used the following code in image.php just after the 'image info' link :
`if (hasMapData()) {echo " / View map";

                echo "";

                printImageMap('10');

                echo "";`

and added a class css\photos.css:
`

mapContainer {


text-align: right;

position: relative;

display: none;

}(copied from#imagemetadata`).

All works fine, except that the map is anchored to the wrong point - it seems to align the top left corner of the map to the page, however the thickbox is still set in the center of the page, causing the map to drift off to the left and top.
If you resize the page, it works fine.

Any ideas?

I'll update if I manage to fix it, I'd say is a redering problem, but it's the same in Firefox and IE.

Member
Member
sbillard   2008-04-21, 16:23
#10

When (see my confidence) you get this working, add the code to your ticket and we will integrate it into the release. Thanks for working on this.

Member
Member
spidge   2008-04-29, 14:30
#11

OK, the problem is definitely that Thickbox is hiding the div until the download or render is complete.

If the div is hidden it doesn't have a height or width (or possibly the maps code just doesn't figure it out properly), so it renders in the wrong place.

The [i]only[/i] way it's going to work properly is if the div is visible while the map loads.

I've got it working properly with an older version of thickbox, that shows the div while it's loading the content, but that's not great. I might see what else is available, but as it stands now the standard thickbox code in ZP is always going to have this problem with google maps.

Member
Member
vile   2008-12-24, 06:43
#12

I tried loading the map first (map.isLoaded()) then hide the div but it didn't work (

Member
Member
vile   2008-12-24, 07:33
#13

haha i just made it worrrkkkk!! anyone who might have the same problem use settimeout()

Member
Member
martin.s   2009-01-25, 14:14
#14

Hi!

I am really happy with this possibility, it is fantastic, but I have the problem described.
So can someone explain me what is ment with the use of settimeout() ?

Thanks a lot!

best!

martin

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.