The ClusterFeatureLayer bundle allows you to cluster features for any point feature service.
dn_clusterfeaturelayer Documentation
Based on the Esri Cluster Layer JS provides here: https://github.com/Esri/cluster-layer-js
https://demos.conterra.de/mapapps/resources/apps/downloads_clusterfeaturelayer4/index.html https://demos.conterra.de/mapapps/resources/apps/downloads_clusterfeaturelayer4_2/index.html
Clone this project and ensure that you have all required dependencies installed correctly (see Documentation).
Then run the following commands from the project root directory to start a local development server:
# install all required node modules
$ mvn initialize
# start dev server
$ mvn compile -Denv=dev -Pinclude-mapapps-deps
# run unit tests
$ mvn test -P run-js-tests,include-mapapps-deps