Select to view content in your preferred language

Progress Bar - Display Events

641
3
06-03-2010 10:56 PM
LakshmananVenkatesan
Frequent Contributor
Hello

In my application, I have mix of Dynamic Service layer, Feature layers. I want to show the progress bar till all layers displayed on the map. The toolkit progress bar disappears as soon as layer is loaded on to map. One of my layer in Dyanmic service layer has nearly 1500 records which is using class value rendering . It takes some time to display on the map. I want to show progress bar/hour glass it TILL THIS GETS COMPLELETLY RENDERED ON THE BROWSER.

I have placed Sliverlight progress bar on Onload event and hiding progress bar onLoadcompleted event, this is not helping me becuase it layer takes more time to renderer on browser before that progress bar disappears.

Please help me on this. This is very urgent for my client

regards
SR
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
Hummm, looks not that easy.

1) The ProgressBar of the toolkit is only designed to track the map loading progress.   So yo will have to create your own ProgressBar UI. But that's not too difficult.

2) The point is how to evaluate the progress : you have to mix the map loading progress and the rendering progress (with a weight you have to define). Concerning the rendering progress, I am not sure if it's possible to get a real progress. My only suggestion at this time would be to track the first LayoutUpdated event following the UpdateComplete event of the feature layer and to consider that at this time the progress is 100%.

Note that I am not really convinced by my solution :confused:, hopefully somebody will have better ideas.
0 Kudos
dotMorten_esri
Esri Notable Contributor
Dominique is hitting a key point here. The problem is that parsing and rendering that many features will effectively cause the framerate to go all the way down (since this has to happen in the UI thread), and there wouldn't be any frames available to update a progressbar. So even if you did make a progressbar, you wouldn't be able to update the progress while this is taking place.
Each layer raises progress differently. Tiled and Dynamic Layers raise progress as the images downloads. Graphics and Element layer doesn't raise any progress, and FeatureLayer raises progress when an Update (ie querying featureserver for features) is taking place, and not when the actual rendering happens. The common thing here is that progress is showing that the app is waiting for data from the network - not the rendering progress itself.
0 Kudos
LakshmananVenkatesan
Frequent Contributor
Thanks for your replies. Yes, I clearly understood the concept here. Is there any work around for this?. At the basic, I want to show the progress bar still images are rendered. This is to ensure to that users will know that layer is loading on to map and they have to wait for few more seconds to get started. This is mainly from usablity prespective.
0 Kudos