RadMap - Clear virtualizationLayer items source

4 posts, 0 answers
  1. David
    David avatar
    27 posts
    Member since:
    Oct 2014

    Posted 22 Jul Link to this post

    I use Radmap for displaying trail in realtime

    the problem is that clearing the data takes too much time (if there are more than 3000 items)

    This is part of my code:

    <telerik:RadMap....>

    <telerik:VirtualizationLayer Visibility=True ItemsSource="{Binding LocationVMs}", ItemTemplate="{DynamicResource LocationTemplate}"/>

    </telerik.RadMap>

     

    Item template is:

    <DataTemplate x:key="LocationTemplate">

    <Ellipse telerik:MapLayer.Location="{Binding Model.Location}" Fill="Red" Width="2" Height="2"/.

    </DataTemplate>

     

    LocationVMs is list of MapLocationEntity that contains one Property named Location (its type is telerik.Windows.Controls.Map.Location)

     in clearing I Clear LocationVMs list- and that causes to stack the system

     

    (if I set VirtaulizationLayer to visibility=Collapsed the system is not stack after clearing the locationVMs list - so I know that the problem is during telrrik try to remove all the trail from the map)

     

    Thanks

  2. Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    495 posts

    Posted 24 Jul Link to this post

    Hello David,

    Thank you for the shared code snippets. 

    My understanding is that you are creating a trail by adding multiple Ellipse objects to the RadMap. What I can suggest as an improvement is to add a single Polyline object and update its Points collection. This would reduce the number of visual elements to be displayed and hopefully improve the performance.  

    On a side note, you can also check out the Visualization Layer of the RadMap, which replaces the InformationLayer, DynamicLayer and VirtualizationLayer and the is the newer visualization package of the control. 

    I hope you find this helpful. 

    Regards,
    Vladimir Stoyanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. David
    David avatar
    27 posts
    Member since:
    Oct 2014

    Posted 05 Aug in reply to Vladimir Stoyanov Link to this post

    Hi,

    thank you for your response,

    We checked the solution it's work good and help.
    But we don't  wants to draw a line and connect all point's together.
    some times we have some point's that are noise (we don't know to recognize them and we also need to see them on the map) , and if we will draw all points as a line - these points will affect the painting radically

    do you have any other solution for us?
  4. Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    495 posts

    Posted 07 Aug Link to this post

    Hello David,

    If the previously suggested solution does not work for your scenario, you can try out the VisualizationLayer and populate it with Map Shape Data objects instead. 

    Alternatively, if possible, you can try to determine the "noise" data points, avoid adding them in the Points collection and display them as Ellipses. 

    Regards,
    Vladimir Stoyanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top