ThinkGeo.com    |     Documentation    |     Premium Support

Refreshing during tracking

I have my own track interactive overlay that Chen did.    I have received complaints of mouse sensitivity being very poor during the tracking process... like it used to be (pre 362).    Recently I added the very cool "GIF Processing" code that you suggested for providing a progress indicator during the OverlayDrawing process.   Well... I'm seeing that progress bar between each mouse click when tracking... which obviously makes tracking performance pretty poor.


I cannot find anything that I'm doing during the mouse move or mouse click or map click events that would be causing this refresh.  Is this coming from the interactive track overlay?


When I go back to the office tonight, I'm going to put break points in all of my event handlers, to make sure I'm not doing anything to cause this.   But, can you confirm that you are or are not doing anything while tracking that woudl cause this overlay drawing event to fire?



Hi Ted,


Tracking shape will cause other overlays to refresh, and the overlay drawing event will be fired when refreshing other overlays. But this refresh process could be very fast (just paste a big bitmap to the screen), so we can make that the gif progress bar has not started to be drawn while the refresh process has finished. 
You can take a look at the sample in the attachment, the real draw method graphics.DrawImageUnscaled in the DrawGifImage function will never be executed when you are tracking some shape.
Any more questions please let me know.
Thanks,
sun

1284-Post6405Demo.zip (14.9 KB)

I will look at your demo, but my point is that the gif progress bar is showing, and is sometimes up for over a secod between mouse clicks while tracking a line. 
  
 I have an aerial image layer assigned, with a FileBitmapTileCache. 
  
 I have the WorldMapKit installed, with its 50 or 80 layers, without a cache  (is that a mistake?) 
  
 I have my 5 of my own layers, without a cache. 
  
 I am not running in multi-threaded mode. 


Sun, I found a MapClick event that was firing whenever I clicked while tracking a line or polygon.    I was not expecting this to be firing while I was tracking.  My event handler was executing code to select an editable shape and highlight it, so that was happening on each mouse click.   I now skip that handler while I’m actively tracking, and all seems ok.    You can close this thread.  Sorry for the bother.

Glad to hear that the problem has been fixed. 
  
 Any more questions please let us know. 
  
 Thanks, 
  
 sun