ClusterPointStyle is integrated into Map Suite's styles. In this project you will see how to use the ClusterPointStyle for clustering various features into one. Sometimes, the map may have too many features which are stacked on top of each other making the map illegible at higher zoom levels. Clustering is a useful technique as it allows you to …
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ClusterPoint
.gitignore
ClusterPoint.sln
README.md
Screenshot.png

README.md

Cluster Point Sample for WinForms

Description

ClusterPointStyle is integrated into Map Suite's styles. In this project you will see how to use the ClusterPointStyle for clustering various features into one. Sometimes, the map may have too many features which are stacked on top of each other making the map illegible at higher zoom levels. Clustering is a useful technique as it allows you to group together various features into one labeled symbol with the count of all the features.

Please refer to Wiki for the details.

Screenshot

Requirements

This sample makes use of the following NuGet Packages

MapSuite 10.0.0

About the Code

ClusterPointStyle clusterPointStyle = new ClusterPointStyle();
clusterPointStyle.MinimumFeaturesPerCellToCluster = 1;
clusterPointStyle.TextStyle = TextStyles.CreateSimpleTextStyle("FeatureCount", "Arail", 10, DrawingFontStyles.Regular, GeoColor.SimpleColors.Black);
clusterPointStyle.TextStyle.PointPlacement = PointPlacement.Center;
clusterPointStyle.TextStyle.OverlappingRule = LabelOverlappingRule.AllowOverlapping;
clusterPointStyle.DrawingClusteredFeature += (s,arg)=> {
    classBreakStyle = classBreakStyle ?? GetClassBreakStyle("FeatureCount");
    arg.Styles.Add(classBreakStyle);
};

Getting Help

Key APIs

This example makes use of the following APIs:

About Map Suite

Map Suite is a set of powerful development components and services for the .Net Framework.

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.