protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF")); Map1.CurrentExtent = new RectangleShape(-131.22, 55.05, -54.03, 16.91); Map1.MapUnit = GeographyUnit.DecimalDegree; WorldMapKitWmsWebOverlay worldMapKitOverlay = new WorldMapKitWmsWebOverlay(); Map1.CustomOverlays.Add(worldMapKitOverlay); InMemoryMarkerOverlay markerOverlay = new InMemoryMarkerOverlay("MarkerOverlay", new Collection() { new FeatureSourceColumn("state")}); //markerOverlay.SuppressingGridSize = 10; Random random = new Random(); for (int i = 0; i < 3000; i++) { double xdelt = random.NextDouble() * (131 - 54); double ydelt = random.NextDouble() * (55 - 16); Feature feature = new Feature(-54 - xdelt, 16 + ydelt); if (i % 2 == 0) { feature.ColumnValues.Add("state", "Texas"); } else { feature.ColumnValues.Add("state", "California"); } markerOverlay.FeatureSource.InternalFeatures.Add(feature); } MarkerValueItem item1 = new MarkerValueItem("Texas"); item1.DefaultMarkerStyle = new PointMarkerStyle(); item1.DefaultMarkerStyle.WebImage = new WebImage("../../theme/default/img/marker_blue.gif", 21, 25); item1.DefaultMarkerStyle.WebImage.RotationAngle = 50; MarkerValueItem item2 = new MarkerValueItem("California"); item2.DefaultMarkerStyle = new PointMarkerStyle(); item2.DefaultMarkerStyle.WebImage = new WebImage("../../theme/default/img/marker_green.gif", 21, 25); item2.DefaultMarkerStyle.WebImage.RotationAngle = -50; ValueMarkerStyle valueMarkerStyle = new ValueMarkerStyle("state"); valueMarkerStyle.ValueItems.Add(item1); valueMarkerStyle.ValueItems.Add(item2); double tolerance = 100; ClusterMarkerStyle clusterStyle = new ClusterMarkerStyle(tolerance, 1600, 1200); clusterStyle.MarkerStyle = valueMarkerStyle;//pointMarkerStyle; markerOverlay.ZoomLevelSet.ZoomLevel01.CustomMarkerStyle = clusterStyle; markerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; Map1.CustomOverlays.Add(markerOverlay); } }