[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Collapse]Vector Data
    [Expand]Providing Data
     Colorizers
     Clusterers
   [Expand]Visual Elements
   [Expand]End-User Interaction
   [Expand]Examples
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Clusterers

This document introduces the Map Clusterers, lists clusterer types, and explains how to create a clusterer and customize its settings.

The document consists of the following sections.

Expanded Overview

The Clusterer is used to aggregate map items based on their location.

This can, for example, be useful to perform density analysis.

To apply the clustering, assign one of the clusterers described below to the MapDataAdapterBase.Clusterer property.

Expanded Marker Clusterer

The Marker Clusterer aggregates items using the following approach.

  • The center item is selected from the collection of source items.

  • All source items that are located closer to the item than the specified threshold along with the item form a cluster.

  • A cluster representative is created and added to the resulting collection. The cluster representative location is equal to the location of the center item.

  • All clustered items are removed from the source collection.

  • The previous steps are repeated until the source collection contains items.

The Marker Clusterer is represented by the MarkerClusterer class.

Expanded Distance-based Clusterer

The Distance-based Clusterer aggregates items using the following approach.

  • Select an item from source items collection.

  • Find the closest cluster for the item.

  • If distance between the cluster and the item is smaller than a specified threshold, then the item is added to the cluster; otherwise, the item forms a new cluster.

  • The item is removed from the source collection. Update the cluster parameters. Note that the cluster representative location is the mean of cluster item locations.

  • The previous steps are repeated until the source collection contains items.

The Distance-based Clusterer is represented by the DistanceBasedClusterer class.

The following table represents the result comparison of clustering using the described above methods.

The clusterer The resulting image
Marker
Distance-based
Note

To implement a custom clusterer, design a class inheriting the MapClustererBase class.

Expanded Common Clusterer Settings

All clusterers shipped with the Map Control support items group providers and custom item factories.

  • Group Providers allow you to separate vector items depending on certain values. By default, the clusterers can use the predefined AttributeGroupProvider to group items by attribute values.

    Note

    To implement a custom Group Provider, design a class inheriting the MapClustererGroupProviderBase interface.

    The following image demonstrates vector items grouped by location name.

  • To customize a cluster representative, you can use the Item Settings. To do this, assign the required MapItemSettings class descendant object to the MapClusterer.ClusterSettings property.

    The following image demonstrates, the custom cluster representatives created using a specified MapCustomElementSettings object.

Expanded Examples

The following examples demonstrate clusterers in action.

Is this topic helpful?​​​​​​​