Set for release in v15.2 is clustering support for both our WinForms and WPF Map Controls. For those unfamiliar with this feature, its designed to aggregate map items and perform data density analysis.
Once shipped, the DevExpress Map Control will support 2 clustering algorithms:
- Distance Based: joins items - whose separation is smaller than a specified threshold - into a single cluster. The cluster's indicator is calculated as the mean of items.
- Marker: joins items - whose distance to the central item is smaller than a specified threshold - into a single cluster. The cluster indicator matches the central item.
You can also implement a custom clustering algorithm by inheriting from the MapClustererBase class (WPF) or implementing the IClusterer (WinForms) interface.
Groups
Predefined clusterers allow you to separate items into groups prior to clustering (for instance, to group items by attribute values before clustering).
It's relatively straightforward to implement this feature for our WPF Map Control - You simply assign the MapClustererGroupProviderBase class descendant object to the GroupProperty property:
If you're using the WinForms version of our Map Control, you would assign an object implementing the IClustererGroupProvider interface to the GroupProperty property:
Custom Indicators
As you'd expect, you can customize cluster indicators as needed (by using custom cluster item factories for WinForms or item settings for WPF).
To customize indicators for the WinForms Map Control, use the clusterer's SetClusterFactory(IClusterItemFactory) method to specify the factory used to generate cluster indicators:
For WPF, specify the required MapItemSetting class descendant object to the ClusterSettings property of the clusterer:
===========================
We'd love to get your feedback on this new Map Clustering feature. How likely are you to use it in your next WinForms or WPF project?