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

Ken Sanderson ken at rockies.ca
Thu Oct 6 17:06:28 EDT 2005


Sorta related to this question, is there a way to allow the user to 
force download all the tiles of the max extent at every scale level? 
Thinking of some of our users that are on super slow dialup, they would 
be willing to download while they east supper with the assumption it 
would be faster after that.

Ken

Paul Spencer wrote:
> 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/|
> +-----------------------------------------------------------------+
> 
> 
> 
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 



More information about the ka-Map-users mailing list