How to achieve some functionality offered by Dinamy Layer with MapShapeDataVirtualizationSource?

1 posts, 0 answers
  1. Alice
    Alice avatar
    4 posts
    Member since:
    Oct 2013

    Posted 27 Jun 2014 Link to this post

    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.

    <telerik:VisualizationLayer x:Name="visualizationLayer">
            <telerik:MapShapeDataVirtualizationSource ClearCache="False" >
                    <telerik:AsyncShapeFileReader x:Name="asyncShapeFileReader"/>
            <telerik:ZoomLevelGrid MinZoom="5" />
            <telerik:ZoomLevelGrid MinZoom="10" />
            <telerik:ZoomLevelGrid MinZoom="15" />
            <telerik:ZoomLevelGrid MinZoom="20" />

    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!
Back to Top