[OpenLayers-Users] strange problems with out of sequence/out of range map tiles

cmose cjmose at gmail.com
Fri Dec 28 09:33:33 EST 2007


I just wanted to see if anyone had come across any more causes of the Random
Tile issue. I'm encountering that quite often using OL 2.6 and TileCache
1.9. Numerous tiles load out of sequence - typically they are copies of
tiles already loaded into the map (e.g., a big land mass tile showing up in
the middle of the atlantic, one country's capital ending up in another
country due to bad tile, etc.,). I am seeing this quite frequently -
unfortunately I can't pop up an example site as this is an internal app. 

(I'm also not seeing any spiral loading - quite typically the tiles in the
middle of the screen are the last to load).

Thanks much



Christopher Schmidt wrote:
> 
> On Thu, Oct 05, 2006 at 09:52:49AM +0100, David Herbert wrote:
>> I don't see this at all.  What I get is a rather random loading, and 
>> often a critical inside tile is last to load.  And sometimes as I said 
>> above, that tile doesn't load at all, though the WMS has served it. 
>> Presumably the requests for tiles are fired off in separate threads 
>> rather than synchronously? So differences in WMS loading and response 
>> times could theoretically mess up spiral gridding?  Doesn't explain the 
>> blank tiles though.
> 
> Although the problem is apparently intermittent and hard to reproduce
> (neither myself, Erik, or Schuyler have ever seen it), I do want to
> address the issue of how the tiles are loaded.
> 
> Loading the actual images is not performed by OpenLayers. The mechanism
> in which tiles are loaded is:
>   
>   * Create a set of 'img' elements in a grid, and set their 
>     style.display to 'none'. An 'onload' event is attached to the image,
>     which will unset its display style, and an onerror event is attached
>     which unsets its display style and changes the background color.
>   * Start at the center of the grid and 'spiral' outward through the
>     grid: set the img src on each image.
> 
> When panning:
>   * A column is taken from the non-visible edge of the grid, and added
>     onto the newly panned part of the grid. The style on these tiles is
>     set to display:none, and the tiles then  have their img.src
>     modified. 
> 
> The second step is probably done more quickly than any of the tiles
> load, and the loading of the tiles is then handled entirely by the
> browser. 
> 
> So, the step to start looking is probably to add some logging in the
> Tile.Image class, possibly in the 'draw' function.
> 
> Beyond that, I've not yet been able to reproduce this, so tracking the
> bug down is very hard: Is it possible that your internet connection is
> relatively slow, and so the tile onload events get confused?
> 
> I would expect that you would *not* have gotten this behavior under 1.0 
> or most of the pre 2.0 svn: Not until we implemented img/tile reuse.
> Unfortunately, this can't just be removed -- the memory ramifications
> for not reusing the image elements are just too high.
> 
> Hopefully, this will help you begin to investigate the problem.
> Unfortuantely, until I can reproduce it, I can't figure out how to help
> debug it.
> 
> Good luck, and please report back if you do find anything.
> 
> Regards,
> -- 
> Christopher Schmidt
> Web Developer
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/strange-problems-with-out-of-sequence-out-of-range-map-tiles-tp6603260p14526518.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list