In my map application built on the ArcGIS API for JavaScript there are a number of points that share a lat/long. I need a way to allow the user to see all of the points at a specific location by exploding them outward when the top point is clicked. The effect would need to be something like Google's MarkerCluster and Spiderfier.
I know this can be done in other libraries, but I can't find anything similar in the ArcGIS API for JavaScript. ArcGIS is a client requirement so I need to stay within that API.
5 Answers 5
See:
http://lele3p.altervista.org/examples/cluster27/index.html
You can download the source code at:
http://lele3p.altervista.org/downloads/cluster27.zip
-
I initially didn't think this was quite the right solution but I revisited and realized that it appears to do the trick. Thanks for the tip!spencerrecneps– spencerrecneps2014年01月27日 16:43:57 +00:00Commented Jan 27, 2014 at 16:43
I couldn't find anything that did exactly what I wanted so I created a layer for it. Clusters points and creates flares for the clusters. Similar to the accepted answser provided by lele3p. Just posted it on github.
There is an official ArcGIS API sample for this now. However, there many TODOs in the code, so you can really use it only if your data are very similar to those in the example. Lele3p's or NickCameron's solution should be better.
There is Point clustering now available in ArcGIS JavaScript 4.x API:
... the 4.14 version of the ArcGIS API for JavaScript (ArcGIS JS API) introduced point clustering in beta. Clustering is a method of merging nearby and overlapping features into a single symbol.
However, it does not look like it includes a spiderfier.
we did it through the server-side clustering solutions and use Esri js-apis to plot the JSON outputs; pls see the app link: http://www.bdvengine.info:8080/bdvengine/BDVMap.html
-
1You seem to have created two accounts, can you merge them ASAP using these instructions, please?2015年04月26日 00:08:35 +00:00Commented Apr 26, 2015 at 0:08
Explore related questions
See similar questions with these tags.