Hi There
I'm loading locations from memory and creating PolylineData and total such PolylineData being created are around 3K, and adding each PolylineData object to the VirtulizationLayer, in a loop.
Ignore the fact that i am creating all PolylineData element on same location in example below,what I'm trying to highlight is need to create them in loop and add them.
The load is quick, but there is performance loss in Zoom and Panning.
1. Just like we can add heavy shape files into VisualizationLayer.VirtualizationSource using MapShapeDataVirtualizationSource AychReader,can we add PolylineData framework elements similarly.
If not , what would be best approach to add large numbers of PolylineData framework elements to Virtualization Layer dynamically.without performance loss.
Thanks In Anticipation
I'm loading locations from memory and creating PolylineData and total such PolylineData being created are around 3K, and adding each PolylineData object to the VirtulizationLayer, in a loop.
for (i = 0; i < 3000; i++) { LoadZones(); }Ignore the fact that i am creating all PolylineData element on same location in example below,what I'm trying to highlight is need to create them in loop and add them.
protected void LoadZones() { PolylineData polyline = new PolylineData() { ShapeFill = new MapShapeFill() { Stroke = new SolidColorBrush(Colors.Red), StrokeThickness = 2, Fill = Brushes.Blue, } }; LocationCollection points = new LocationCollection(); points.Add(new Location(-20.0791497684858, 57.5683593750001)); points.Add(new Location(-20.04819100048355, 57.6390838623048)); points.Add(new Location(-20.082374288709, 57.6507568359376)); points.Add(new Location(-20.0791497684858, 57.5683593750001)); polyline.Points = points; this.visualizationLayer.Items.Add(polyline); }The load is quick, but there is performance loss in Zoom and Panning.
1. Just like we can add heavy shape files into VisualizationLayer.VirtualizationSource using MapShapeDataVirtualizationSource AychReader,can we add PolylineData framework elements similarly.
this.mapShapeDataReader.SourceCollection.Add( new AsyncReaderSource() { //Add PolygoneData Object });If not , what would be best approach to add large numbers of PolylineData framework elements to Virtualization Layer dynamically.without performance loss.
Thanks In Anticipation