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

RadMap - Clear virtualizationLayer items source

3 Answers 208 Views
Map
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 22 Jul 2019, 09:11 AM

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

3 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 24 Jul 2019, 12:11 PM
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.
0
David
Top achievements
Rank 1
answered on 05 Aug 2019, 06:32 AM
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?
0
Vladimir Stoyanov
Telerik team
answered on 07 Aug 2019, 11:04 AM
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.
Tags
Map
Asked by
David
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
David
Top achievements
Rank 1
Share this question
or