hi, i looked at this only briefly, this is close to what you're doing but how about a check in imgOnLoad() like<br>
<br>
if(this.id==this.parentNode.parentNode.lastChild.lastChild.id && this.src != this.kaMap.aPixel.src)<br>
<br>
i _think_ that might check if the current 'this' has the same id as the last tile image. <br>
<br><br><div><span class="gmail_quote">On 10/12/05, <b class="gmail_sendername">Peter Giencke</b> <<a href="mailto:pgiencke@glc.org">pgiencke@glc.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Paul et al,<br><br>I've finally had some time to start working on this issue. My current course<br>of action is to keep track of the number of images set/created and compare<br>that by implementing a counter in imgOnLoad.
<br><br>The problem I'm running into is that the number of set/created images is<br>always lower than the actual number of images calling to the onload<br>function. Here's what ka_map is reporting for a simple ka_map instance:
<br><br>Not a_pixel images calling imgOnLoad: 98<br>a_pixels images calling to imgOnLoad: 210<br>Total number of calls to imgOnLoad: 308<br><br>setTile images set: 224<br>Created via createTile: 140<br><br>Am I missing something, or is there a better way to gauge the total number
<br>of pictures set/created to compare with the imgOnLoad counter...<br><br>-pete<br><br>Paul Spencer wrote:<br>> Peter,<br>><br>> there could be :) The way things are working right now (iirc) is<br>> that each image on each layer has its src changed when something
<br>> happens like a pan or a zoom. This *could* be tracked in kaMap by<br>> incrementing a variable that indicates the number of tiles left to<br>> load. Each image has an onload event that is triggered to make the
<br>> image visible (it is set to not visible when the src is changed)<br>> which could also decrement the tile count.<br>><br>> We could add a new event to indicate the that load status has changed<br>> but this may involve some thrashing if the images load quickly before
<br>> the loop to set the src has finished (I don't even know if this is a<br>> possible scenario).<br>><br>> Another way would be to have your app set a timer to check the load<br>> status every 100ms or so and see if the load count has hit zero ...
<br>><br>> If you come up with a good way in your app, share it with me and I'll<br>> put it in cvs as I think this is a generally useful function.<br>><br>> Cheers<br>><br>> Paul<br>><br>> On 6-Oct-05, at 4:22 PM, Peter Giencke wrote:
<br>><br>>> Paul et al,<br>>><br>>> Is there a lightweight way to determine when ka-map has finished<br>>> loading all layers for a particular view? I'm utilizing some WMS<br>>> layers for one particular ka-map instance, and would like to indicate
<br>>> (with an icon or<br>>> something) that the mapplication is actually doing something while<br>>> it's fetching/creating the tiles.<br>>><br>>> -pete<br>>><br>>><br>><br>
> +-----------------------------------------------------------------+<br>>
|Paul
Spencer
<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a> |<br>> +-----------------------------------------------------------------+<br>>
|Applications & Software
Development |<br>>
|DM Solutions Group
Inc
<a href="http://www.dmsolutions.ca/|">http://www.dmsolutions.ca/|</a><br>> +-----------------------------------------------------------------+<br>><br>><br>><br>><br>> _______________________________________________
<br>> ka-Map-users mailing list<br>> <a href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</a><br>> <a href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users
</a><br>><br><br>_______________________________________________<br>ka-Map-users mailing list<br><a href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/ka-map-users">
http://lists.maptools.org/mailman/listinfo/ka-map-users</a><br><br>_______________________________________________<br>ka-Map-users mailing list<br><a href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org
</a><br><a href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users</a><br></blockquote></div><br>