[ka-Map-users] Re: Map loaded ?

David Badke dbadke at uvic.ca
Tue Jul 4 12:07:26 EDT 2006


I have been messing with this problem, off and on, for a couple of 
months. The problem is in determining when to increment a counter of 
tile loads, so that it can be decremented in the onload event handler of 
the tile img elements. So far I have found that the counter needs to be 
incremented in setTile, and again each time the tile img source is set 
to "a_pixel", since these also trigger an onload event. By the time the 
"a-pixel" onload event triggers, the img source has been set to the real 
tile image, so the "a-pixel" loads can't be filtered out in the onload 
handler. I have got it to the point where it is "almost" reliable, but 
it still sometimes doesn't count down to zero or counts down past zero. 
It seems that in some cases the onload event does not trigger. I suspect 
it is related to the way tile img elements are reused, but I haven't 
figured out what the problem is.

If anyone wants to take a crack at the problem, I can make my hacked 
kaMap.js code available. I don't have time to work on it much, but maybe 
someone else has ideas...

David



Paul Spencer wrote:
> There is currently no way to determine this.  I did try to get it 
> working using the onload of each tile but I wasn't able to figure out 
> some problem with scope and counting.  I think it could probably be 
> solved now but its a fairly low priority and I'm probably not going to 
> tackle it myself.
>
> Cheers
>
> Paul
>
> On 30-Jun-06, at 3:29 PM, jerome.teisseire at free.fr wrote:
>
>> Hi,
>> How can i know that all tiles are loaded?
>> To do a waiting message.
>>
>> Thanks.
>>
-- 

David Badke
Humanities Computing and Media Center
University of Victoria, BC, Canada



More information about the ka-Map-users mailing list