I was wondering if there was a way to use a progress bar to show the user that the layer is loading as a visual cue. If it could be a 0% - 100% scenario that would be great but I'm thinking just a looping progress bar that resets when the layer is done loading would be sufficient too.
I've tried using the overlaydrawing type events but I get cross threading issues when trying to apply a value to a progress bar due to the control being generated in a different thread.
So you would see the progress bar move when it finishes a layer inside of an overlay or for each overlay? If our event is generate on a different thread then you can still update your progress bar but you need to do an Invoke to send the call back to the UI thread. Using Invoke is the recommended way to deal with Winforms controls when you are on a separate thread. Could you consider just an animated circle or something that shows that it is loading but does not indicate progress?
Absolutely. At this point, simply a visual cue that there is loading taking place is sufficient. I’m familiar with using Invoke to affect controls not on the thread it was created on but I wasn’t sure on how to integrate that with the way Map Suite currently operates.
Thanks Don,
I am aware of the event. Which does not work as reliable as we would like. Specially for WMS overlay Even after overlay is drawn mouse move fires the drawing and drawn events. Our customer wants to see a busy sign when the wms and other online layers are loading data from different sources and then disappear when done loading…
The tiles are drawn in multi-threads by default. In the mode, the Drawing and Drawn events can’t be fired actually. you can try setting the thread to single.