+ Reply to Thread
Results 1 to 6 of 6

Thread: Capturing when clusters are done rendering on a graphics layer

  1. #1
    Marni Fowler
    Join Date
    Apr 2010
    Posts
    7
    Points
    0
    Answers Provided
    0


    0

    Angry Capturing when clusters are done rendering on a graphics layer

    I have a graphics layer that whose graphics are displayed as clusters.

    We have a Busy Indicator that we pop up during long calculations to let the user know that something is happening. I would like to pop up this indicator during the clustering, and have it go away once the clusters have done drawing on the screen. I can turn it on, but I am not able to capture a "done rendering" event to turn off the indicator. I've tried capturing the LayoutUpdated event on the Map, but it gets sent several times and am not able to determine which one is the graphics layers saying its done rendering. I found the OnClusteringCompleted event of the GraphicsClusterer and but I am unable to capture it.

    We are using ArcGIS 9.3.1 and Silverlight 4.

    Any suggestions on how to accomplish what I want?

  2. #2
    Jennifer Nery

    Join Date
    May 2010
    Posts
    2,449
    Points
    289
    Answers Provided
    51


    0

    Default Re: Capturing when clusters are done rendering on a graphics layer

    ClusteringCompleted event is currently internal to the API, which is why you couldn't access it.
    Jennifer Nery
    Software Developer
    ArcGIS API for SL/WPF/WP7

  3. #3
    Marni Fowler
    Join Date
    Apr 2010
    Posts
    7
    Points
    0
    Answers Provided
    0


    0

    Unhappy Re: Capturing when clusters are done rendering on a graphics layer

    May I ask why it is hidden? What is the reasoning? That just seems a bit silly. It seems to me that wanting to capture that event would be something one would want to be able to do. Do you have any suggestion on how to accomplish what I want? In our application, there is more than a few seconds delay between when the user hits the button to execute a query and when the clusters appear on the screen. We would like to give the user some indication that something is happening.

  4. #4
    Jennifer Nery

    Join Date
    May 2010
    Posts
    2,449
    Points
    289
    Answers Provided
    51


    0

    Default Re: Capturing when clusters are done rendering on a graphics layer

    Clustering actually does not take a long time to execute. It could be the QueryTask that takes time and there is ExecuteCompleted and Failed events you can use. Can you check to see if this works for you?
    Jennifer Nery
    Software Developer
    ArcGIS API for SL/WPF/WP7

  5. #5
    Marni Fowler
    Join Date
    Apr 2010
    Posts
    7
    Points
    0
    Answers Provided
    0


    0

    Default Re: Capturing when clusters are done rendering on a graphics layer

    Its not the clustering that is the problem, its the rendering on the screen. We are using a web service to do our query, not a query task. We handle when the service is completed and returns our results. But there is still a significant delay sometimes between when this occurs and when the actual clusters appear on the screen. I've managed to kludge together a solution using the Layout_Updated event and checking for when the graphics layer's full extent gets set and using that as an indication that the clusters are done drawing so the busy indicator can be turned off. Its not perfect because sometimes there is still a slight delay, but its acceptable, for now. Whenever a new query is made, I have to clear out the graphics and refresh the graphics layer so the extent gets set to null so the busy indicator doesn't get turned off prematurely on the new query.

    It would just be alot easier if the OnClusteringCompleted event was not internal. Why is it?

  6. #6
    Morten Nielsen

    Join Date
    Oct 2009
    Posts
    1,166
    Points
    44
    Answers Provided
    7


    0

    Default Re: Capturing when clusters are done rendering on a graphics layer

    I'd still like to know a little more about this. I've had tens of thousands of points, and clustering still happens very fast. You say rendering takes a while? The whole point with clustering is that it should only render a very limit set of points so rendering will be fast. How many clusters do you end up with that causes the rendering to be so slow?
    /Morten Nielsen
    ArcGIS Runtime SDK for .NET
    silverlight team blog - twitter - personal blog

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts