ESRI point clustering example using featurelayer or querytask as input?

14328
42
Jump to solution
10-05-2012 08:32 AM
TracySchloss
Frequent Contributor
I have tried to implement the ESRI forum example for clustering "Clustering with Javascript API" http://www.arcgis.com/home/item.html?id=c546bc8d4f0b4c0fbdf149b92223e681 with mixed results.  Sometimes the cluster layer draws fine and sometimes it doesn't draw at all.  Even when it draws it's very slow and I'm not sure the users will be satisfied.  There seems to be mixed reviews on this.  The fact that it's display seem to be intermittent for me is enough for me to look to another clustering solution. 

More recently, the ESRI sample "Point Clustering" was posted. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_point_c... I like the way this looks, but I'm having a hard time understanding how to make it work with a layer as input, since my data is already in a service.  It seems like either I should add a function to step through all my features to create properly formatted input data, or I should edit the custom layer to handle features of a featureset or featurelayer instead.

Has anyone modified ESRI's point clustering example to use something besides the input JSON file?
42 Replies
ShawnLanning
New Contributor II

Thanks.

0 Kudos
veenahosur1
New Contributor II

Tracy,

can you provide whole working code please. Because your above code is not working for me so

0 Kudos
VaibhavGrigo3
New Contributor II

Hello Everyone,

I have found one sample for clustering on featureLayer. Please refer to this.

Regards,

Vaibhav Grigo