Yet another map question - scale this time

Howdy - The sometimes on sometimes off deal isn't yet resolved, but I have managed to add an overview map.

Anyway - the new question is why is are the maps on the album page and image page different hight/widths? I was sort of under the assumption that the ht/width was being read from the hardcoded variables in phooglelite.php, but since they are different I must be wrong?

Any ideas on where to look for this difference?

Thanks!

Nif

Comments

  • The two functions default the zoom factor differently. (Don't know why.)
  • Hey there sbillard -

    I think I used the wrong word - I used scale and I meant to say dimension. Sorry.

    Just in case anyone else ever searchs on this - The scale defaults are set differently for album and image. Album is scale 6 and image scale 8 - I think - it maybe reversed.

    And that can be changed by passing the scale variable in the <?php printImageMap(15); ?> command. I put in "15" for my image pages and then added an overview window to the Google Map by editing the phooglelite.php.

    But it's the dimensions that are weird - I assume you were actually replying to what I meant, not what I said - and you don't know why they are different.

    I looked at the page source for the two album/image and I got these dimensions.

    Album: <div id="map" style="width: 595px; height: 446px">
    Image: <div id="map" style="width: 595px; height: 300px">

    The dimensions set in phooglelite.php are those for image - so somewhere the album dimension variables are being overwritten. Now to figure out how - so I can reset both of them.

    Also in phooglelite.php there is this code:
    /**
    * @function setWidth
    * @param $width:int
    * @returns nothing
    * @description Sets the width of the map to be displayed
    */
    function setWidth($width){ $this->mapWidth = $width; }

    /**
    * @function setHeight
    * @param $height:int
    * @returns nothing
    * @description Sets the height of the map to be displayed
    */
    function setHeight($height){ $this->mapHeight = $height; }

    So it must be possible to set this stuff to override the defaults. I just don't know enough about php to know where this is being used and how to overwrite it.
  • The functions are:

    `function printAlbumMap($zoomlevel='8', $type=NULL, $width=NULL, $height=NULL)`

    `function printImageMap($zoomlevel='6', $type=NULL, $width=NULL, $height=NULL))`

    So, it would appear (looking at the code) that you can pass the width and height dimensions as the third and fourth parameters. When these parameters are not passed, the code leaves the defaults as they were which should be 595 x 300.

    So, it would seem that if you do not pass any parameters to these print functions, you would get a map that is 595 x 300 (as in your image map.)

    I also looked for calls on these functions in the distributed themes. The only themes calling printAlbumMap are Effervescence+ and Example, which do not pass parameters for width and height. Which theme are you using?
  • Howdy -

    That helps a lot.

    I am using the testing theme.

    One question down (sort of), one to go!

    Thanks for finding that.

    Nif
Sign In or Register to comment.