How to know when a polygon is drawn?

Feb 14, 2011 at 4:41 PM

Hello everyone,

I'm using InfoStrat on a WPF application. On this application I process a bunch of point coordinates and have them added to my PublicEventsGlobeControl as polyline shapes (.Host.Geometry.AddGeometry). Since I'm displaying a rather large ammount of data, wich takes its time to be drawn in to the Globecontrol, sometimes It would be helpfull to show a progress bar,or even a shape counter (shape y of yy) on the interface.

This brings me to my question about InfoStrat, is there any way to know if a given polygon (or polyline) has been drawn in to the GlobeControl? I've monitored the AddGeometry method, but that only seems to be one part of the process (gathering all the items to draw), I can't find any way to reach the actual "drawing" of the items or to know wich were drawn so far.

Can anyone help me to figure this out? Any pointers on were I should look this up?

Thanks and best regards,

-RG

Coordinator
Feb 18, 2011 at 4:16 AM

I don't think there is any way to tell when the geometry is displayed. It is all handled within the GlobeControl, and it rate limits certain things such as the number of LatLongToPoint calculations per frame. One idea would be to figure out how many geometry elements you are sure you can add per frame then in your own code only add that many each time. That way you can track the counter yourself.

Feb 18, 2011 at 12:00 PM

Hi, thanks for the reply!

I think my code could handle that approach, is there any baseline value for the number of calculations per frame? Doens't need to an exact value, just something I could use as a starting-point and then refine through analisys?

Thanks and best regards,