[ka-Map-users] Re: Code to indicate tiles have finished loading?

Paul Spencer pspencer at dmsolutions.ca
Thu Oct 6 16:55:49 EDT 2005


Peter,

there could be :)  The way things are working right now (iirc) is  
that each image on each layer has its src changed when something  
happens like a pan or a zoom.  This *could* be tracked in kaMap by  
incrementing a variable that indicates the number of tiles left to  
load.  Each image has an onload event that is triggered to make the  
image visible (it is set to not visible when the src is changed)  
which could also decrement the tile count.

We could add a new event to indicate the that load status has changed  
but this may involve some thrashing if the images load quickly before  
the loop to set the src has finished (I don't even know if this is a  
possible scenario).

Another way would be to have your app set a timer to check the load  
status every 100ms or so and see if the load count has hit zero ...

If you come up with a good way in your app, share it with me and I'll  
put it in cvs as I think this is a generally useful function.

Cheers

Paul

On 6-Oct-05, at 4:22 PM, Peter Giencke wrote:

> Paul et al,
>
> Is there a lightweight way to determine when ka-map has finished  
> loading all
> layers for a particular view? I'm utilizing some WMS layers for one
> particular ka-map instance, and would like to indicate (with an  
> icon or
> something) that the mapplication is actually doing something while  
> it's
> fetching/creating the tiles.
>
> -pete
>
>

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+






More information about the ka-Map-users mailing list