Map shows up sometimes

Hello -

So I"m playing around with the testing theme and the css (learning from looking at pages I like and playing with the code). Anyway...

1) In the album view (main albums and subalbums) a map (showing points for all images) appears (for lack of better word). The map does not show up in main albums (http://www.crankybunny.com/zenphoto/Morroco_May5/), but does show up where I have subalbums (http://www.crankybunny.com/zenphoto/maroc trip/Morroco_May7/).

2) I assume that albums and subalbums use the same album.php

3) When I view the source code for both links above - I see <div id="map"> and then all the javascript that makes the google map. So, I know that the code is being generated somehow.

4) In my album.php I make no mention of inserting a map - no div so I don't know where the instructions to make this map are coming from. This, I think, is the key but I don't know how to find this code.

Can someone point me in the right direction?

Thanks.

Nif

Comments

  • Also - this is only sort of related...

    In the subalbum (where the map shows up) I have 24 images (not the 20 specified in my zenphoto options. Why? And how/where can I change this.

    Thx. Nif
  • What is it that you are trying to do with your first post?

    1) Maps will only be printed on the album/subalbum that they are in.
    2) Correct
    3) and 4) the code is being generated by printAlbumMap()

    Images per page are a little trickier in this release, but for good reason. Themes are allowed to (somewhat) override the option set in the admin page. Open up your album.php for example. On line 5 you will see $firstPageImages = normalizeColumns(1, 7);
    What this is doing is saying that you only want 1 column of albums, but 7 columns of images. So Zenphoto is looking at what you have set for images per page and figuring out the closest multiple of 7.
  • Hello there -

    Twofold resons

    1) I want to know how to turn off the inclusion of a map (say for instance that I don't want a map in the album view but I do want one in the image view.

    2) I want to know why my current album view, which does not have the command printAlbumMap() in the album.php is showing a map.(or in one case not showing, but the code is there when you look at view source). What is making this map show up if my album.php does not include that command.

    Shall I post the code I am using for my album.php?
  • OK -

    So I do actually have printAlbumMap in my album.php (I had a typo in it late last night printAlbum5 - that I didn't see until I uploaded a new album.php this morning so).

    So there should be maps on the album pages - I understand - and there are.

    The thing that is baffling now is why the maps sometimes shows up sometimes doesn't. The javascript code is there, but the maps are not always visible. Baffling. Would it have something to do with map width or something like that?

    Nif
  • I have never seen the behavior you are describing, sometimes it shows sometimes it doesnt. Can you show me the album where I can check it out? As per my understanding, if for example, you have 4 levels of subalbums and the geocoded images are in the 4th level of subalbums, then it will only show in that level.
  • OK -

    1) The Morocco May 5 album is a main album and when you look at the page you can see that there is a space for a map, but no map is visible. Then when you View Source you can see the Google Maps coding for the map too. The coordinates are correct. Morocco May 5

    2) The Morocco May 6 dup album is also a main album but a map is visible here on the page and in the View Source. This is, I think, the most correct rendering of my three examples. Morocco May 6 dup

    3) The Morocco May 7 is a subalbum. A map is visible, but it is the wrong (or a different) shape than the map in the main album level. And, of course, the mapping code is visible in the View Source. Morocco May 7

    And as an aside, I set that value for photos per column to 5 and now 20 photos per page show up. Thanks for the heads up on that stuff.

    Thanks!

    Nif
Sign In or Register to comment.