1

Closed

FetchThread Problem

description

Upper level tile does not cleared from cache when there is exact zoom level tile is available. It just goes behind the exact zoom level tile. Problem is more visible when you turn off your Raster Layer. Seems some problem with threads and cache object. Is cache object thread safe?

file attachments

Closed Apr 21, 2014 at 8:41 PM by pauldendulk
A lot has been changed in the related methods. This is not relevant anymore.

comments

asad_jahangir wrote Jul 31, 2012 at 12:41 PM

Paul,
Commenting "IsFullyShown" method solves this problem, What is the purpose of this method? Can you please look into this so that I can finalize with this fix.

if (!IsFullyShown(feature))
{
    //GetRecursive(resultTiles, schema, cache, tileInfo.Extent.Intersect(extent), level - 1);
}

pauldendulk wrote Aug 1, 2012 at 7:04 AM

This is relevant to the short animation of the transparency that is used when a new tile arrives. This trick makes arrival of new tiles look more smooth.

When a tile is halfway the transparency animation you still want to show the tiles below that tile. Otherwise you would have a half transparent tile on top of a white background, which just looks ugly.

In your example the tile itself is also partly transparent. This is not such a problem if the background would disappear when the tile is full Opaque. This is not happening and that is the bug. I think there should be some event when the transparency animation has ended that can be used to trigger a redraw.

Also perhaps it should be possible to disable the transparency animation for a specific layer.

asad_jahangir wrote Aug 12, 2012 at 9:01 AM

Well, I was working on this issue, in first attempt I tried the event solution when the animation is completed I just raise the refresh event which redraws everything. It has some problems. First of all completed event is raised exactly the number of time, you have tiles on screen which in my case are around 35 for local raster and 75 for Google raster. That means it will redraw all layers again and again depending upon the visible raster, 35 times or 75 times that is not suitable. (In my case I have around 40 layers including with some animation which takes time and processing to render again)

I have a solution in my mind with that we can avoid unnecessary refreshes.

When we look for upper level tile we know that for what tile we are looking for its alternative tile. I store the upper level tile reference into the actual tile and on completed event I look for if it have any alternative tiles associated with it then remove it from canvas (renderedGeom). It works some times and some time does not.
When further analyzed, I found that when a tile is rendered it don't have only one alternative tile, It have up to 3 level upper resolution tile while I am keeping/deleting just immediate upper tile.
IsFullyShown Method should be aware if we already found the upper level tile it should not dig for further tiles. Due to some other tasks deadline I am not able to look into it again in details.
Please have a look at it if you can spare some time.

For the clear visibility of issue I am attaching a screen shot where you can observe that up to 3 levels, background tiles are rendered