PolylineData Performance Issues

4 posts, 0 answers
  1. Alan
    Alan avatar
    9 posts
    Member since:
    Nov 2013

    Posted 16 Apr 2014 Link to this post

    I'm using a VisualizationLayer along with MapShapeData to display road routes data on a RadMap.  Since the road routes have many waypoints, I used PolylineData to represent the data, and set up the layer with a collection of these items.

    My problem is that at *detailed* zoom levels, the performance of the map suffers greatly.  If I zoom in to a single polyline at the most detailed level, I see the polyline rendering as a series of dozens of individual blurred strokes rather than as a connected line.  

    My shot-in-the-dark guess would be that the calculation and rendering of all of these individual items is what causes the map to slow down, and that the rendering switches from a standard polyline to this new schema at a certain zoom level.  Do you know why this is happening and how I might fix it or work around it?
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 21 Apr 2014 Link to this post

    Hi,

    At the first glance it could be a problem with using of the bitmap cache in the layer. By default it is turned on to speed up rendering of the point-type objects. But for the layer which show map shape data objects bitmap cache should be turned off. For example:

    <telerik:RadMap x:Name="radMap"
                    ZoomLevel="6"
                    Center="37, -120">
        <telerik:RadMap.Provider>
            <telerik:OpenStreetMapProvider />
        </telerik:RadMap.Provider>
        <telerik:VisualizationLayer x:Name="visualizationLayer" UseBitmapCache="False">
        </telerik:VisualizationLayer>
    </telerik:RadMap>

    Please, give it a try. If it will not help, could you, please, provide us with your solution or with a small sample solution which reproduces the problem?

    Regards,
    Andrey Mruzov
    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Alan
    Alan avatar
    9 posts
    Member since:
    Nov 2013

    Posted 21 Apr 2014 in reply to Andrey Link to this post

    Thanks Andrey, that worked for the speed issue.

    One follow-up question.  Is there a way to control the re-rendering of layers?  Right now, when you are at a given zoom level and then drastically change the zoom, shapes do not redraw until the entire zoom animation is finished.  

    For example, if I'm viewing the entire world, a line (via MapShapeData) from Washington, DC to New York may appear tiny at that zoom level, but the thickness of the line covers a very large area, simply because I'm zoomed out.  Now, I zoom in to one of those cities and the line becomes massive, filling in nearly the entire screen, and only redrawing when the animation to zoom in is entirely finished.  If I'm a user trying to figure out what the right zoom level is, I have to keep pausing in moving my scroll wheel to view my lines at a better size.  Is there any way around this?

    One example of a remedy is if somehow we could say that once a user passes a certain change in zoom level, always redraw (for example, for every 3 zoom steps) -- though this may be an expensive operation, and slow down the map. But I'd take any ideas for how to avoid the above problem.

    Thanks for your help!
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 22 Apr 2014 Link to this post

    Hi Alan,

    This behavior has been changed already. The improvement should be available in the latest internal build.

    Regards,
    Andrey Murzov
    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.

     
Back to Top