Hello
First of all: Thanks a lot for your great photo gallery. I was looking and comparing for quite a while and zenphoto really rocks.
I got a small problem though: I want to include the printGoogleMap function on the search page, so that it displays a map containing all the search results (at least the ones that contain GPS data). Is this possible at all? In the plugin documentation you state that it automatically detects if it is on an image or an album page. Does this mean that there is no possibility to include it on the search.php page?
Comments
I believe that calling `printGoogleMap(NULL, NULL, NULL, 'album_page', 'map_callback');` on the searh page and providing the `map_callback()` function to populate the geodata from the images found by the search will work, but it is not tried. For examples of this callback, see the effervescence+ and garland themes album handling.
You really rock!
I encountered another problem. I can populate the geodata from the images and display the map with markers. This works perfectly on my search site now (e.g. http://www.strukturlos.ch/zenphoto/page/search/biene).
However, if I click on one of the markers, the info bubble content is empty. On the normal album page it displays the image name in the bubble. I tried to stick to the effervescence+ album page to see how the image name is collected there, but I really can't find a solution how to collect the data and pass it to the printGoogleMap() function.
Maybe you have a solution?
Here the code for my image-<div> on the search page:
`
<?php if (getNumImages() > 0) { ?>
<?php
while (next_image()) {
if ($map) {
$coord = getGeoCoord($_zp_current_image);
if ($coord) {
$coord['desc'] = '<p align=center>'.$coord['desc'].'';
$points[] = $coord;
}
}
?>
<?php } ?>
<?php } ?>
`
And after that I use the map_callback as follows:
`<?php
if (!empty($points) && map) {
function map_callback($map) {
global $points;
foreach ($points as $coord) {
addGeoCoord($map, $coord);
}
}
?>
<div id="map_link">
<?php printGoogleMap(NULL, NULL, NULL, 'album_page', 'map_callback'); ?>
</div>
<?php
}
?>`
I also try to put google map in search.php from zpArdoise. I'm not able.
Can anybody help me?
I don't know how to " providing the map_callback() function to populate the geodata"
Please be gentle with me. I'm not a programer.
Vincent please help me.
I'd like to see all my pictures from all albums in the google map to have an overview from all locations. It is very important for my site.
You have exactly what I need. If it's complicated to make it in the menu like:
[Vincent Bourganel] Photos
i'm also happy if I can make it over the archive in the search.php
i'm using zpArdoise for desktop and zpBootstrap for mobile.
Best regards
Ierdna
you can create a page that show all your geo-localized pictures.
that is what you can see on my website.
to do that, read this news: http://www.vincentbourganel.fr/news/map-of-geo-localized-pictures/
I don't know what are your needs on search page but I never tried to add a map on the search page of my themes. seems to improve the code.
you can also refine my tips by having a complex search (having geo-localized data and having beach or mountain or spring tags for example) and then saving all of these searches as dynamic albums and show a link the way you want in a page.
you can inspire yourself by this site:http://www.boutsdeplanete.com/portfolio/
Thank you Vincent.
I have a problem to do this step:
"in your gallery page, create a new research solely on these "longitude" and "latitude" fields, entering the search criteria * "
I'm now in Admin/Options/Gallery but can't find any option to enter the search criteria *
Vicent
it works. I have now a new menu item Map.
Another question : where can I change in zpArdoise the image thumb size? Now is 150px x 150px
Thank you very much!!!
with zpArdoise, you can use galleriffic script or not.
if not, your thumbs are 150x150 sized everywhere in the site.
if you use galleriffic, you have this size of 150x150 in search page.
this is the same trouble with zpbootstrap and isotope, as these scripts doesn't work if you have albums and pictures in same level, I don't use them in search page.