ThinkGeo.com    |     Documentation    |     Premium Support

Refresh a specific area!

Hi


 


I have the following scenario to do:


I have like a tracking operationg but with a high speed (aproximatly 200 millisecond)


I tried to perform a Dynamic refresh (Refreshing a specific Overlay), but this method is hiding then showing the whole layer; The i used the standard Refresh, this works perfectly untill certain limits, but this method requires about 40 % from my cpu.


 


Can we use a refresh for a specific area of the layer or of the Overlay (like specifying the bounding rectangle to refresh)  ???


 


Thanks



I am not sure I understand exactely why the Dynamic Refresh passing a specific Overlay is not an adequate solution in your case. I am not sure what you mean by "this method is hiding then showing the whole layer".

 We have several projects in the Code Community where you track high speed vehicle with a detailed background map (World Map Kit) and with a good performance. I suggest you check the sample Side View Icon for example and see for yourself the performance.


code.thinkgeo.com/projects/show/sideviewicon


 You can see in the screen shot, I set the timer to 200 milliseconds and I have the CPU Usage staying at around 10%.




Thanks Val for your interest !! 



It is real that your scenario takes about 10% for 200 ms 

In my case i am testing the same operation for 100 ms , and it takes about 40% 

and then i tested it for 50 ms, it takes about 50~60 % 



OK, this is not a real scenario for all the time, but in my case it maybe real for sometimes  

I am trying to draw an internal network traffic in a big company ... (these details are not important) 



but my idea is to make the refresh operation more efficient like refreshing only a specific area (giving a boundingBox to refresh) 


The problem of Showing\Hiding was on using the MultiThread and fast refreshing (like on our scenario)




I hope it will be clear to you 

If it is not clear, i will send you my test project to see the scenario 





Thanks a lot.



I also tested with 50 ms of time interval and I let the sample “Side View Icon” run for 10 minutes. The CPU usage stayed at around 20%. I guess I don’t quite understand what your real world scenario is and why you would need to refresh every 200 ms. Also, I would to understand better what you are doing exately with multithreading. I think that the best would be for you to send us your test project to see the scenario. If you don’t feel comfortable sharing your test project to the community in the Discussion Forum, please contact Support at support@thinkgeo.com and they will set you up. 
  
  I could present to the development team the idea of adding a new API for the refreshing a specific area with a bounding box but that team has a lot on its plate right now and  before doing that I want to make sure that we explore correctly all the possibilities with the current API. 
  Thank you for your understanding.

OK Val, thanks 
  
 I think that the current working method will be enough for me (refreshing only the overlay with single thread) 
 I could not set the project here because it is contained in a big solution, and i think that it will be hard to separate the map in another project… 
  
 but your "idea of adding a new API for the refreshing a specific area" is very interesting.

The Ghost, 
  
 We’re glad that Val’s method is working with you. 
  
 Please let me know if you have more questions. 
  
 Thanks 
  
 James