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

Use of AsyncReaderSourceCollection with VirtualizationSource

6 Answers 71 Views
Map
This is a migrated thread and some comments may be shown as answers.
Alice
Top achievements
Rank 1
Alice asked on 23 Jun 2014, 09:01 AM
I'm experimenting with AsyncShapeFileReader using the provided example. It works as expected with AsyncShapeFileReader's Source and DataSource properties set. The only thing I wish to change in the example is to use AsyncReaderSourceCollection to asyncronously load multiple shape files and benefit UI Virtualization.

01.<telerik:VisualizationLayer.VirtualizationSource>
02.    <telerik:MapShapeDataVirtualizationSource>
03.        <telerik:MapShapeDataVirtualizationSource.Reader>
04.            <telerik:AsyncShapeFileReader x:Name="mapShapeDataReader">
05.                <telerik:AsyncReaderSourceCollection>
06.                    <telerik:AsyncReaderSource Source="/MyProject;component/Resources/myshape1.shp" DataSource="/MyProject;component/Resources/myshape1.dbf" />
07.                    <telerik:AsyncReaderSource Source="/MyProject;component/Resources/myshape2.shp" DataSource="/MyProject;component/Resources/myshape2.dbf" />
08.                </telerik:AsyncReaderSourceCollection>
09.            </telerik:AsyncShapeFileReader>
10.        </telerik:MapShapeDataVirtualizationSource.Reader>
11.    </telerik:MapShapeDataVirtualizationSource>
12.</telerik:VisualizationLayer.VirtualizationSource>


Visualization layer displays only the last AsyncReaderSource (myshape2.shp), although ReadShapeDataCompleted is called twice without exception. I wonder is it possible to load multiple shapes asynchronously and benefit Items Virtualization?

6 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 23 Jun 2014, 04:18 PM
Hello Alice,

You should set the MapShapeDataVirtualizationSource.ClearCache property to 'False' when you use the AsyncReaderSourceCollection.
The sample code is below.
<telerik:MapShapeDataVirtualizationSource ClearCache="False">
...
</telerik:MapShapeDataVirtualizationSource>

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Alice
Top achievements
Rank 1
answered on 24 Jun 2014, 06:17 AM
thanks alot for help, problem solve
0
brousouf
Top achievements
Rank 1
answered on 14 Oct 2014, 08:36 PM
Hello,
I'm trying to load many KML files from code behind. It works fine with one KML, but I'm not able to make it work with many of them, (loading from code behind, not in XAML).
Thanks a lot
0
Petar Mladenov
Telerik team
answered on 15 Oct 2014, 12:03 PM
Hi brousouf,

Is it possible for you to open a new support ticket with more details about your scenario ? What type of Layer do you use ? Can you send us an isolated sample that we can better investigate? Thank you in advance for your cooperation.

Regards,
Petar Mladenov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Sanjay
Top achievements
Rank 1
answered on 21 Jan 2015, 09:53 AM
Hi Petar

1. Can you share C# code for implementing VisualizationLayer.VirtualizationSource ,i.e I wish to create Virtualization layer object at runtime, define and add MapShapeDataVirtualizationSource AsyncShapeFileReader  in MapShapeDataVirtualizationSource, and 
setting its source to URI shapefile.

2. How many Virtualization layers can i add to radMap.

3. What is the maximum size of shapefile in MB which radMap WPF engine can render without UI responsive issue.

4. I have some 3000 shapefiles of size less than 5 KB.Should i add them all in one Virtualization layer or can load each of them in individual Virtualization layers.Kindly advice.

Thanks In Anticipation.

0
Petar Mladenov
Telerik team
answered on 23 Jan 2015, 02:31 PM
Hi Sanjay,

We answered these questions in the following forum thread.

http://www.telerik.com/community/forums/how-to-add-asyncshapefilereader-to-mapshapedatavirtualizationsource-at-runtime

Regards,
Petar Mladenov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Map
Asked by
Alice
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Alice
Top achievements
Rank 1
brousouf
Top achievements
Rank 1
Petar Mladenov
Telerik team
Sanjay
Top achievements
Rank 1
Share this question
or