Skip to content

ArcGIS javascript custom graphics layer. Creates clusters and creates flares for clusters.

License

Notifications You must be signed in to change notification settings

snydesc/FlareClusterLayer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlareClusterLayer

This is a custom graphics layer that inherits from ArcGIS js graphics layer. Clustering is nothing special but I couldn't find an arcgis js api layer that clustered with flares...like the Silverlight Flare Clusters, which is why I created this.

The clustering is performed using a grid system based on the current extent, the pixel dimensions of the map and a configurable cluster ratio that can be set to suit a data set.

Features

  • Clustering can be performed by the layer by passing it a dataset, or it can display pre-clustered data if your data is already grouped into clusters (server side clustering).

  • Flares (really just circles positioned around the cluster graphic) will be created for individual points when the cluster contains <= a configured amount of points. Selecting these clusters will open an info window for the object.

  • Flares can also be created for counts of sub types. For example, if all of your data objects contain a property called 'Type', you can create flares for large clusters that contain the count of each unique value of the property 'Type'.

  • The boundary of the points in a cluster can also be displayed as a polygon behind the flare with a separate renderer to style however you like. They can be displayed on hover, tap, all the time or not at all.

  • Summary flares with the text '...' and a tooltip containing all data will be created if there's too many to fit in the configured total amount of flares to display.

  • Configure the symbology to be whatever you want by using a renderer for the clusters and single symbols and an optional second renderer for the cluster boundaries.

All of the options are explained in the constructor of the layer so just check out the code for a full explanation. A demo is here: http://flareclusterlayer.azurewebsites.net/

Have a look at index.html for an example of how to use. It's the same as the demo link.

Enjoy!

About

ArcGIS javascript custom graphics layer. Creates clusters and creates flares for clusters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 83.8%
  • HTML 16.2%