Feature Cluster/Reduction - Render symbol color by size

388
3
06-11-2019 12:28 PM
ChrisSmith7
Frequent Contributor

Hello,

I understand featureReduction in v4 isn't yet on par with v3, so in v3, is it possible to render cluster colors by size? For example:

https://developers.arcgis.com/javascript/3/jssamples/fl_clustering_toggle.html

...rather than using Drawing/Rendering Info from the service:

https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/socal_precincts_points_2008/Featur...

...I'd like to have a renderer based on cluster size as determined by featureReduction. Something more like this:

https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html

Is this possible?

Thanks!

0 Kudos
3 Replies
ChrisSmith7
Frequent Contributor

Inspecting the DOM, I can see there is a way I could loop over the radius vals and roll my own classification:

It would be preferable to take advantage of the API, though, if it's supported.

0 Kudos
ChrisSmith7
Frequent Contributor

Ok, so I just created a function to loop the elements and assigned color based on three classes as a function of the cluster pixel size.

0 Kudos
by Anonymous User
Not applicable

How did you manage to access the DOM elements in the canvas? 

 

0 Kudos