printAlbumDesc() and printGoogleMap functionality in Archive

I'm using the theme Zpbase. I've installed the Plugin GoogleMap, which works great for me when viewing a physical album (the function collects all the coordinates from the images in a physical album and shows it on a Google Map, and it is possible to view images by clicking on the markers on the map) or when viewing one specific image (the map then only shows the coordinates of this image).

For example, this is how it looks like in one of my physical albums: http://bildbank.skarefjall.se/NaturVarSommar/Sverige/Harjedalen/. The link "Google map" appears and when clicking on that you can see all the coordinates for the images in that album.

I'm interested in using this functionality also on the Archive page and when performing a search of images. What I would like is that it should be possibly to see a map of ALL images with GPS-information on the Archive page. I would also like that the images of one specific search would appear on a Google Map. That is, the same functionality that is being used when collecting data from a physical album. Is this possible to achieve?

A part of the code in album-masonry.php, that I think creates the map with all the images in a physical album;

<div id="object-desc"><?php printAlbumDesc(); ?></div>
<?php if function_exists('printGoogleMap')) { ?><div id="map-wrap"><?php printGoogleMap('Google Map',null,'hide'); ?></div><?php } ?>

I've tried pasting the code above in the related .php-files, but no map shows. And I suppose this is due to the fact that the functions can't collect the coordinates in the Archive and Search-pages, or am I making a wrong conclusion?

I'm not at all a programmer, I must add...

Comments

  • acrylian Administrator, Developer
    The googlemap plugin is setup to collect the GPS coordinates from either an image or all imagegs of an album. On the archive page there is no album.

    There is no simple solution for this, especially since you say you are not a programmer. Sorry.
  • OK, thanks.

    I have already been in contact with a programmer, and he recommended me to describe the problem in this first forum first, just to see if an easy solution already existed. Now I know that there is no simple solution, so I will contact the programmer again and see if he can help med achieve what I am requesting.
  • I must ask again, regarding the second functionality I asked for;

    "I would also like that the images of one specific search would appear on a Google Map. That is, the same functionality that is being used when collecting data from a physical album."

    In this case (after performing a search or when clicking on a date or a tag on the archive-page) an album is indeed created (perhaps it is not defined as a physical album, but as a dynamic album in this case). Is it not possible to add the Google Map functionality in that case? That is, editing the file search.php in a way so that the "Google map"-link appears as it does in an ordinary physical album? If this was possibly, I could just add a certain tag that would be the same for all of my images, and by clicking on this tag you would be able to see a Google Map where the coordinates of all my images appear.
  • acrylian Administrator, Developer
    The GoogleMaps functionality should work with a dynamic album. While a dynamic album is a "saved search" it is not the same like displaying search results.

    It would surely be possible to extend the GoogleMaps display with search results. You just have to extend it or create your own additional custom plugin. What you need to use is the object model lying behind everything.
    http://www.zenphoto.org/news/zenphotos-object-model-framework
    This is advanced theming and not possible to "just adding a link".
  • OK. The possibility to create dynamic albums could then be a way to achieve what I am requesting. The problem is, that I do not think that the theme Zpbase, which I'm using, is supporting the feature of making dynamic albums, or am I wrong? Is there a plugin that I can activate to make it possible to create dynamic albums when using this theme?
  • acrylian Administrator, Developer
    Dynamic albums itself are theme independent. You can create dynamic albums from search results programmatically but the theme naturally has to be modified to do so. So some coding work to do. Also since you need them only temporarily you also need to code to remove them again. Otherwise you will of course get loads of dynamic albums.
Sign In or Register to comment.