problem with google_map plugin

vincent3569 Member, Translator
hello

I'm trying to implement google_map plugin on my web site.
I don't understand something :
in image page, I used this following code
`

<?php if (function_exists('printImageMap')) { ?>

<?php printImageMap();?>

<?php } ?>

``

all is OK,the google map is displayed for the only picture which is geolocalized.

But, in the album page, I used this following code

``

<?php if (function_exists('printAlbumMap')) { ?>

<?php echo 'true'; printAlbumMap(); ?>

<?php } ?>

``

and nothing is displayed when I have an geolocalized image in the album.

what'is the matter with this function ?`

Comments

  • vincent3569 Member, Translator
    hello

    I think I've found the problem

    in google_map.php, there are the following functions :

    line 170 : function printImageMap($zoomlevel=NULL, $defaultmaptype=NULL, $width=NULL, $height=NULL, $text=NULL, $toggle=true, $id='googlemap', $mapselections=NULL, $addwiki=NULL, $background=NULL, $mapcontrol=NULL, $maptypecontrol=NULL, $customJS=NULL)

    line 252 : function printAlbumMap($zoomlevel=NULL, $defaultmaptype=NULL, $width=NULL, $height=NULL, $text='', $toggle=true, $id='googlemap', $firstPageImages=0, $mapselections=NULL, $addwiki=NULL, $background=NULL, $mapcontrol=NULL, $maptypecontrol=NULL, $customJS=NULL)

    in function printImageMap, there is $text=NULL, and in function printAlbumMap, there is $text=''.

    in the first case, if you write <?php printImageMap();?> in your theme, a "Google Map" link is displayed :

    `Google Map

    `
    but, in the second case, if you write <?php printAlbumMap();?> in your theme, an empty link is displayed :

    `

    `
    Do you think I'm right ?
  • acrylian Administrator, Developer
    You know that these things like `$text` are parameters you can or should set? I am not familiar with this plugin at all but there are probably also some options on the backend.
  • vincent3569 Member, Translator
    hello

    yes of course, you can set this parameter (only in the call of the function and not in the back end).
    but if you don't do that, there is a default display.

    in the two case, the default display is 'Google Map', but with printAlbumMap(), you have this code (line 313) :
    `if (is_null($text)) $text = gettext('Google Map');`
    and the default value for $text is ''.
    so the default value is never displayed.

    maybe you should set this code :
    `function printAlbumMap($zoomlevel=NULL, $defaultmaptype=NULL, $width=NULL, $height=NULL, $text=NULL, [...]` and everything will be ok
  • acrylian Administrator, Developer
    Sorry, although its an official plugin I neiter used ever it nor I am familar with it. My collegue sbillard probably knows more.
  • The parameter default should, of course, be NULL, not ''. We will correct that.
  • vincent3569 Member, Translator
    thanks !!
  • vincent3569 Member, Translator
    you need a ticket in ZenPhoto trac or not ?
  • The parameter issue was already fixed in SVN in changeset [6177].
Sign In or Register to comment.