InformationLayer Not Clearing

2 posts, 0 answers
  1. Sean
    Sean avatar
    10 posts
    Member since:
    Aug 2011

    Posted 13 Oct 2011 Link to this post

    I have an InformationLayer that contains points through a LocationCollection property in a view model. When I call the Clear() method on the LocationCollection, the lines on the map don't go away (even if I zoom in or out). My InformationLayer XAML looks like the following. As mentioned, MyPolyline is a LocationCollection:

        <telerik:MapPolyline Points="{Binding MyPolyline}" Fill="Transparent" Stroke="Teal" StrokeThickness="1" />

    It appears I'm running version 2011.2.920.40. I have confirmed the MyPolyline.Count property is 0 after calling the Clear() method, but as mentioned, the lines on the map don't go away.
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 18 Oct 2011 Link to this post

    Hello Sean,

    This is known issue with ObservableCollection in WPF. The Clear method don't raise "collection changed" event. Please, use our extension method RemoveAll instead. For example:


    Kind regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top