Switching from Clustered Data Source to Items Data Source

3 posts, 0 answers
  1. board_ch
    board_ch avatar
    23 posts
    Member since:
    Jun 2006

    Posted 26 Nov 2013 Link to this post

    I'm trying to give the ability to the user to change between two modes ( with/without clustering). Right now I'm "nulling" the itemtemplate and removing the datamappings. what is the best and clean way to achieve this ?

    ObservableCollection<MapItem> _dataItems = this.GetMapData();
     if (MapConfigurationProperties.IsClusteringEnabled)
        this.informationLayer.ItemTemplate = null;
        this.informationLayer.ClusteredDataSource = _dataSource;
        this.informationLayer.ClusteredDataSource = null;
        this.informationLayer.ItemTemplate = this.radMap.Resources["itemTemplate"] as DataTemplate;
        this.informationLayer.DataMappings.Add(new DataMapping("Location", DataMember.Location));
        this.informationLayer.DataMappings.Add(new DataMapping("BaseZoomLevel",
        this.informationLayer.DataMappings.Add(new DataMapping("ZoomRange", DataMember.ZoomRange));
        this.informationLayer.ItemsSource = _dataItems;

    One strage thing that happen swithing from one mode to another is that the points one the map are translated despide the fact the the underline data are unchanged.

  2. Andrey
    Andrey avatar
    1681 posts

    Posted 26 Nov 2013 Link to this post

    Hi Simone,

    Unfortunately we're not sure what to advice you without having a closer look at your implementation.

    Could you, please, open a support ticket and provide us with your solution or with a small sample solution which reproduces it? This will enable us to better understand your approach and advice you how to proceed with it.

    Thank you in advance.

    Andrey Murzov

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.

    Sign up for Free application insights >>
  3. board_ch
    board_ch avatar
    23 posts
    Member since:
    Jun 2006

    Posted 28 Nov 2013 Link to this post

    Hi Andrey,
    I solved the problem, it was simply that I've provided zoomrange and basezoom in only the item data source and not in the clustered data source.

    Thanks anyway
Back to Top