Hello Dingmou,
This sample is created based on our Service Edition, that mean everything the sample need is in the Core and every product can use it.
In Sliverlight edition, it has a little special, you can't use it in the client side because client side use it's own core system are not totally as same as Service edition, but you can let it work at ServerSide and call it in Client side. Please check the code below:
Create it in server side:
ClusterPointStyle clusterPointStyle = new ClusterPointStyle(PointSymbolType.Triangle,
new GeoSolidBrush(GeoColor.FromArgb(150, GeoColor.StandardColors.Orange)),
new GeoPen(GeoColor.StandardColors.Red, 2), 27);
clusterPointStyle.TextStyle = new TextStyle("FeatureCount", new GeoFont("Arial", 8), new GeoSolidBrush(GeoColor.StandardColors.Black));
clusterPointStyle.TextStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;
clusterPointStyle.TextStyle.PointPlacement = PointPlacement.Center;
ShapeFileFeatureLayer clusterVolcanoesLayer = new ShapeFileFeatureLayer(@"..\..\Data\volcanoes.shp", ShapeFileReadWriteMode.ReadOnly);
clusterVolcanoesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Clear();
clusterVolcanoesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(clusterPointStyle);
clusterVolcanoesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
ServerLayerOverlay clusterOverlay = new ServerLayerOverlay("ServerSideClusterStyle");
clusterOverlay.Layers.Add(clusterVolcanoesLayer);
SilverlightMapConnector1.ServerLayerOverlays.Add(clusterOverlay);
Call it in Client side:
ServerLayerOverlay serverLayerOverlay = new ServerLayerOverlay("ServerSideClusterStyle", "SilverlightMapConnector1");
serverLayerOverlay.IsStretchEffectDisabled = true;
serverLayerOverlay.TileType = TileType.SingleTile;
Map1.Overlays.Add(serverLayerOverlay);
Please feel free to let us know your queries.
Regards,
Gary