This is a migrated thread and some comments may be shown as answers.

VisualizationLayer ClusterItemTemplate change by count

1 Answer 35 Views
Map
This is a migrated thread and some comments may be shown as answers.
CW
Top achievements
Rank 1
CW asked on 29 Jun 2015, 08:36 AM

I just added Visualization layer with ClusteringEnabled="True"  so my requirement is  cluster ellipse style need to change according to count.

how can  i achieve this.

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 01 Jul 2015, 07:30 AM
Hello CW,

Please check the approach in our Clustering Help Artcile. You can use the ClusterItemTemplate property of the VisualizationLayer and add Ellipse in a DataTemplate. You can bind the Background / Fill of the Ellipse or other element in the Template to the Count property of the underlying ClusterData object. Converter will help you to set different background / fill depending on the Count. 

<DataTemplate x:Key="ClusterTemplate">
    <Border Background="#af3f3f3f"
            CornerRadius="3"
            MouseLeftButtonDown="ExpandClusterToPolygon"
            MouseRightButtonDown="ExpandCluster"
            telerik:MapLayer.HotSpot="0.5,0.5">
        <Ellipse Fill={Binding Count, Converter ={StaticResource />
    </Border>
</DataTemplate>


Regards,
Petar Mladenov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Map
Asked by
CW
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or