windowsforms-devexpress-dot-xtramap-dot-mapcontrol-587c8a06.md
Gets or sets the mode that enables cluster interactivity.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
[DefaultValue(null)]
public InteractiveClusterModeBase InteractiveClusterMode { get; set; }
<DefaultValue(Nothing)>
Public Property InteractiveClusterMode As InteractiveClusterModeBase
| Type | Default | Description |
|---|---|---|
| InteractiveClusterModeBase | null |
Specifies an interactive mode for clusters.
|
Users can hover over a cluster to expand it and see all nested map items. To enable this functionality, follow the steps below:
Create a MouseHoverInteractiveClusterMode object and assign it to the MapControl.InteractiveClusterMode property.
Select a layout algorithm that defines how to position nested map items when a cluster is expanded. To do this, assign one of the following objects to the InteractiveClusterModeBase.ExpandedClusterLayout property:
The following example selects an optimal view (circular or spiral) for nested cluster items depending on their count in the cluster:
MouseHoverInteractiveClusterMode interactiveMode = new MouseHoverInteractiveClusterMode();
interactiveMode.ExpandedClusterLayout = new ExpandedClusterAdaptiveLayout();
map.InteractiveClusterMode = interactiveMode;
Dim interactiveMode As MouseHoverInteractiveClusterMode = New MouseHoverInteractiveClusterMode()
interactiveMode.ExpandedClusterLayout = New ExpandedClusterAdaptiveLayout()
map.InteractiveClusterMode = interactiveMode
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the InteractiveClusterMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-map-aggregate-vector-items-using-a-clusterer/CS/ClustererSample/Form1.cs#L35
interactiveMode.ExpandedClusterLayout = new ExpandedClusterAdaptiveLayout();
map.InteractiveClusterMode = interactiveMode;
}
winforms-map-aggregate-vector-items-using-a-clusterer/VB/ClustererSample/Form1.vb#L38
interactiveMode.ExpandedClusterLayout = New ExpandedClusterAdaptiveLayout()
map.InteractiveClusterMode = interactiveMode
End Sub
See Also