[ka-Map-users] slideBy

Charlton Purvis cplist at earthlink.net
Fri Sep 30 17:08:11 EDT 2005

Hey, Paul:

> I would have thought you would have needed to do something like:
> var oMap = myKaMap.getCurrentMap();
> for (var i in oMap.aLayers)
> {
>      var layer = oMap.aLayers[i];
>      for (var i in layer.domObj.childNodes)
>      {
>          layer.setTile( layer.domObj.childNodes[i] );
>      }
> }

I gave that a shot, and it doesn't change the layer until I pan or do
something to the image.  That's why I got lucky w/ the slideBy or at least
why I thought I'd try it!

> I am assuming that you are passing the timestamp as part of setting
> the img src in the setTile function ...

Maybe I'm going about this all wrong, but it makes sense to me.  I've got
files that look like:

avhrr_sst_composite_2005_09_23.png  avhrr_sst_composite_2005_09_27.png
avhrr_sst_composite_2005_09_23.wld  avhrr_sst_composite_2005_09_27.wld

And I have a select box w/ yyyy-mm-dd.  So all I do is pass along to
tile.php whatever timestamp they've selected.  And it's w/i tile.php where I
determine whether or not a particular layer needs a timestamp.  If so, tack
it on to the group_name so that the tile routine will treat it like a
uniquely named group.  So I end up w/ group names like
avhrr_sst_composite_2005_09_23 (internally).  And if no image is found, of
course, I have to create one!  So at that point I

That's probably more than you wanted to know, but I think my main issue is
making sure that tile.php knows what the dynamic filename is so that it can
either grab the cached image or produce it.


More information about the ka-Map-users mailing list