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

ClusterItem.Items

3 Answers 63 Views
Map
This is a migrated thread and some comments may be shown as answers.
Mehmet
Top achievements
Rank 1
Mehmet asked on 13 Aug 2012, 11:30 AM
Hi,

I am trying to set a visual effect on ClusterItem by depending on the child items properties. I sent the ClusterItem to an IValueConverter and while debugging i can't see the child items in my ClusterItem but on coding there is no any property named items.

here is my Cluster template :
                    <DataTemplate x:Key="ClusterTemplate">
                        <Grid x:Name="ParentRoot"
                              Width="40" Height="40"
                              telerik:MapLayer.Location="{Binding Path=Center}"
                              telerik:MapLayer.HotSpot="0.5,1"
                              
                              MouseLeftButtonUp="ClusterMouseClick"
                              MouseRightButtonUp="ClusterRightMouseClick">
                            <Path Data="M978.6509,491.334L958.6109,491.334L954.4549,500.874L949.9999,491.334L930.6259,491.334C928.4169,491.334,926.6259,489.543,926.6259,487.334L926.6259,433.272C926.6259,431.063,928.4169,429.272,930.6259,429.272L978.6509,429.272C980.8599,429.272,982.6509,431.063,982.6509,433.272L982.6509,487.334C982.6509,489.543,980.8599,491.334,978.6509,491.334z"
                                  StrokeStartLineCap="Flat"
                                  Stretch="Fill"
                                  StrokeEndLineCap="Flat"
                                  Stroke="{Binding Converter={StaticResource alarmIndicator}}"
                                  StrokeThickness="1"
                                  StrokeMiterLimit="10"
                                  StrokeLineJoin="Miter"
                                  Fill="#7F000000"/>
                            <!-- Title -->
                            <TextBlock HorizontalAlignment="Center"
                                       VerticalAlignment="Top"
                                       Margin="5"
                                       TextAlignment="Center"
                                       Foreground="White"
                                       FontSize="12"
                                       Width="36"
                                       TextWrapping="Wrap"
                                       Text="{Binding Path=Count}"/>
                        </Grid>
                    </DataTemplate>

And my Converter:
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value == null)
                return null;
            ClusterItem item = (value as ClusterItem);
            var items = item.Items; // this is not possible

........
return something;

        }

I can see and inspect the items while debugging and also i can reach that property through immediate window, but i cant get that property through coding.

How can i get child items properties? Any idea...

Thanks anyway.

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 16 Aug 2012, 02:33 PM
Hi Mehmet,

 The ClusterItem is a single item that represents a collection of grouped (clustered poitns). Please note that you can't index it, the onliest public properties you may use are as presented in our API . Can you please provide some more information on what exactly are you trying to achieve with "set a visual effect on ClusterItem" so that we will be able to help you? A sample image demonstrating what do you expect your map to look like will be great. 

Regards,
Evgenia
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
vinutha
Top achievements
Rank 1
answered on 05 Dec 2014, 10:59 AM
Hi,

  Could please help me to get the Children id the Cluster Item , I want to displaythe list of children when i right click the cluster. 


Regards Vinutha
0
Petar Mladenov
Telerik team
answered on 08 Dec 2014, 08:02 AM
Hello Vinutha,

Please check out the following forum thread and let us know if the project from 8 Dec 2014 meets your requirements.

Regards,
Petar Mladenov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Map
Asked by
Mehmet
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
vinutha
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or