ThinkGeo.com    |     Documentation    |     Premium Support

Blinking on Refresh(Overlay)

Greetings,


Just as some background, I am running WPF map in MultiThreaded mode.  I can't duplicate the behavior in SingleThreaded mode.


I have noticed that when I call Map.Refresh(Overlay), often times the layer blinks when it repaints.  However, I've found if I call Map.Refresh(AllOverlays) then there is no blinking.  Is it possible to refresh just a single overlay without getting the blinking, and if not, what can be done to minimize the amount of blinking?


I have attached a very quick sample I made.  Drag from gray box, it refreshes all overlays and does not blink.  Drag from red box, refreshes only single overlay and often times blinks.


Thanks,


Ryan



1638-BlinkingSample.zip (15.6 KB)

 


Ryan,
 
I can recreate your problem. The MultiThreaded mode is not very stable somehow, we will plan to research on it and fix the problem, so we recommend you use SingleThreaded mode.
 
If you still want to have a try to use MultiThreaded mode, I have an idea to reduce the blinking, you can set the TileCache for base overlay. Using InMemoryBitmapTileCache
 
b.TileCache = new InMemoryBitmapTileCache();
 
Or using FileBitmapTileCahce
 
            FileBitmapTileCache bitmapTileCache = new FileBitmapTileCache();
            bitmapTileCache.CacheDirectory = @"..\..\SampleData\Data\SampleCacheTiles";
            bitmapTileCache.CacheId = "BaseCachedTiles";

            b.TileCache = bitmapTileCache;

 
But this solution just can work with this issue, I am not very sure there are another issues. If you encounter some other problem, please let me know.
 
Thanks
 
James