AnsweredAssumed Answered

Create Legend for Cluster Layer

Question asked by cplouffedev on Oct 1, 2013
Latest reply on Oct 1, 2013 by cplouffedev
Hello,

I've recently been employing the ClusterLayer module (https://developers.arcgis.com/en/javascript/jssamples/layers_point_clustering.html) to represent point clusters in a web mapping application, and I'm interested in being able to display the different symbols for cluster sizes in a Legend object.  Essentially, what I want is each classification symbol followed by a label which tells the user the range of the number of points which would be represented by that symbol.  I've considered just making a static image to depict this, but that approach seems kind of hackish, and if the symbology were to be changed, I'd like the legend to be able to dynamically reflect that.

I'm aware that the ClusterLayer is a modified GraphicsLayer object, and have read that the best way to display GraphicsLayer symbology in a Legend object is by converting the layer into a feature collection, and from that using a FeatureLayer to populate the Legend.  I'm not quite sure how I would go about that using a ClusterLayer, as the symbology is not tied to any particular attribute, but rather the proximity of features to one another.

I'm wondering if anybody has any experience addressing this problem, or a problem similar to it.  Obviously, if necessary, I can take the approach of creating a static legend image I suggested above, but I'd like to avoid this if at all possible.

Please, let me know if anyone has ideas for a solution to this issue.

Thanks a lot,
Cam

Attachments

Outcomes