Clustering event listener

544
1
Jump to solution
04-30-2013 09:32 AM
AaronPerry
New Contributor III
I'm clustering 20k+ points over a basemap. This causes the browser/player to hang with a blank base map for several seconds while it does the math, I guess. Then I get a nice set of clustered graphics on the map with no latency thereafter. This is of course driving me, and my boss, insane due to the 10+ second wait. So I've used mobilecomponents.swc to thrown up a BusyIndicator which I would like to turn off when clustering completes.

Does any one know if there is a way to listen to clustering? I did not see any relevant events in the API ref, but I am new to this.

I also tried adding a preloader, but it completes before any of this latency begins, and actually makes the overall spinup time increase.

It's probably worth mentioning that this is in a Flash Builder project with the 3.2 flex viewer source. The only mod to the source is adding the following code to index.mxml. I plan to make it prettier than this if I can find a way to turn it off after the clusters are visible. I also built a custom query widget, but it is not loaded when this latency occurs.

    </viewer:ViewerContainer>
 
    <s:BusyIndicator id="busyIndicator"
                           symbolColor="red"
                           visible="true"
                           width="200"
                           height="200" />



Any help or guidance would be greatly appreciated.

Thanks,
Aaron
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AaronPerry
New Contributor III
I solved this by making a modified version of this progress bar widget.  Mine uses the mobilecomponents.swc BusyIndicator as an indefinite busy indicator.  In registerHandlers I attached a listener to the cluster layer's UPDATE_END event.

View solution in original post

0 Kudos
1 Reply
AaronPerry
New Contributor III
I solved this by making a modified version of this progress bar widget.  Mine uses the mobilecomponents.swc BusyIndicator as an indefinite busy indicator.  In registerHandlers I attached a listener to the cluster layer's UPDATE_END event.
0 Kudos