Google Maps


Are these instructions still the simplest way to trigger Google Maps from within a Zenpage, like you have on your site?

I have my Google API key applied, & the search shows photos that have GPS cords, but a map does not come up when i click the link.


  • acrylian Administrator, Developer

    IMHO that should still work. Did you check that the album itself works and it's images are published? Also if they show coords on the map itself?

    Btw, you should add his name/Theme to the topic title so it is clear what this is about. And you can also reference Vincent directl yby adding @vincent3569 to your post.

  • vincent3569 Member, Translator
    edited January 2019


    the code remains the same since zenphoto 1.4.6.
    you can see the result here:

    and of course, my tip describes how to create a specific page with all geotaggued pictures of the gallery.
    but you have nothing to do in albums pages: the theme manage googlemap plugin and osm plugin.

    a starting point, before making a dedicated page, is to enable the googlemap plugin and to see it in action in an album page with geotaggued pictures.

    if it works well, to create the dynamic album with the relevant search, and then see it in album page.

    last, create the page with the provided code.

  • Thanks Vincent

  • vincent3569 Member, Translator

    oups, another (undocumented) tips:

    with zpBoostrap, if you create a page to show a global map of the whole gallery, its title-link have to be map.

    due to the loading time of gm scripts, I enable scripts (googlemap and openstreetmap) only for album pages and for a page named map.

  • vincent3569 Member, Translator
    edited January 2019

    I just updated the news:

    • you can use GoogleMap or openStreetMap to display a global map
    • how use it with the theme zpBoostrap

  • tplowe56 Member
    edited January 2019

    Ok got his working. Great!!

    One question.

    How to add GPS coord to an old album (not just 1 image). For example an album that was shot in Africa in 2000. (prior to GPS exif) This would cause a link to the whole album to show up on the map.

    Could this be done in via custom data field, in the album properties?

    Or can I bulk edit GPS coords to images within an album in ZP? I know I can do this in Lightroom.

  • acrylian Administrator, Developer

    Zenphoto has no feature to edit meta data because it is mean to be embedded into the images. Any meta data refresh would be overwriten. If you need to do it manually you have to do it in the database itself respectively the object model.

  • Thanks

  • acrylian Administrator, Developer

    Addition: Object model usagewould be as follows:

    1. Create an image object of the image you want to change meta data (see the object model guide on
    2. Then look at the database for the column to change. Since these have no methods as the example getTitle() you can use the generic method set() instead:
      $imageobj->set('<name of your field>', '<your value>'); $imageobj->save();

    And then NEVER push the meta data refresh button anywhere as this will overwrite. Or export the meta data to XMP files using hte xmp meta data plugin. So best is still to embed this info if you can.

Sign In or Register to comment.