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

PolylineData Performance Issues

3 Answers 138 Views
Map
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 16 Apr 2014, 01:53 PM
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?

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 21 Apr 2014, 09:54 AM
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.

 
0
Alan
Top achievements
Rank 1
answered on 21 Apr 2014, 02:51 PM
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!
0
Andrey
Telerik team
answered on 22 Apr 2014, 01:42 PM
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.

 
Tags
Map
Asked by
Alan
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Alan
Top achievements
Rank 1
Share this question
or