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?
`<?php <br />
if (getImageEXIFData()) {echo "
";
printImageMetadata('', false);
} `
Cheers
Comments
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.)
Ticket also submitted as requested.
`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?
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.
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 only 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.
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