Use of VisualizationLayer (with VirtualizationSource and AsyncShapeFileReader) facilitates work with RadMap control and have a lot of advantages compared with Dynamic Layer (improved performance, asyncronous shape loading, virtualization). But I don't get how to achieve a functionality provided by Dynamic Layer with VisualizationLayer.
1) I load some initial shapefiles with AsyncShapeFileReader, but when I try to add some additional shape files to AsyncShapeFileReader.SourceCollection and call AsyncShapeFileReader.ReadAsync() method, they don't appear on the map. Moreover when I try to remove existing shapefiles from AsyncShapeFileReader.SourceCollection and call VisualizationLayer.RefreshVirtualSource() method, they still displayed on the map. Is it possible to load and unload shapefiles with MapShapeDataVirtualizationSource during the program execution?
2) MapPinPoint (used by old visualization engine) has ImageSource property. Is there any way to set ImageSource to PointData instance and change the default item template?
3) What is the right way to hide/show and add/remove several shape features (loaded with MapShapeDataVirtualizationSource) depending on map zoom level or other events? In Dynamic layer you can handle it inside ItemsRequest() method.
For example, I loaded a shape file with PointData instances that are visible on all zoom levels. Is there a way to automatically hide them if zoom level comes to some level.
Another example, how to display on the map only some filtered by user shape features and hide all the rest?
Thanks in advance!
<
telerik:VisualizationLayer
x:Name
=
"visualizationLayer"
>
<
telerik:VisualizationLayer.VirtualizationSource
>
<
telerik:MapShapeDataVirtualizationSource
ClearCache
=
"False"
>
<
telerik:MapShapeDataVirtualizationSource.Reader
>
<
telerik:AsyncShapeFileReader
x:Name
=
"asyncShapeFileReader"
/>
</
telerik:MapShapeDataVirtualizationSource.Reader
>
</
telerik:MapShapeDataVirtualizationSource
>
</
telerik:VisualizationLayer.VirtualizationSource
>
<
telerik:VisualizationLayer.ZoomLevelGridList
>
<
telerik:ZoomLevelGrid
MinZoom
=
"5"
/>
<
telerik:ZoomLevelGrid
MinZoom
=
"10"
/>
<
telerik:ZoomLevelGrid
MinZoom
=
"15"
/>
<
telerik:ZoomLevelGrid
MinZoom
=
"20"
/>
</
telerik:VisualizationLayer.ZoomLevelGridList
>
</
telerik:VisualizationLayer
>
1) I load some initial shapefiles with AsyncShapeFileReader, but when I try to add some additional shape files to AsyncShapeFileReader.SourceCollection and call AsyncShapeFileReader.ReadAsync() method, they don't appear on the map. Moreover when I try to remove existing shapefiles from AsyncShapeFileReader.SourceCollection and call VisualizationLayer.RefreshVirtualSource() method, they still displayed on the map. Is it possible to load and unload shapefiles with MapShapeDataVirtualizationSource during the program execution?
2) MapPinPoint (used by old visualization engine) has ImageSource property. Is there any way to set ImageSource to PointData instance and change the default item template?
3) What is the right way to hide/show and add/remove several shape features (loaded with MapShapeDataVirtualizationSource) depending on map zoom level or other events? In Dynamic layer you can handle it inside ItemsRequest() method.
For example, I loaded a shape file with PointData instances that are visible on all zoom levels. Is there a way to automatically hide them if zoom level comes to some level.
Another example, how to display on the map only some filtered by user shape features and hide all the rest?
Thanks in advance!