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

Performance issue with 2000+ MapLines

3 Answers 73 Views
Map
This is a migrated thread and some comments may be shown as answers.
Ernstjan
Top achievements
Rank 1
Ernstjan asked on 25 Feb 2011, 10:32 AM
Hi All,

I'm want to use the RadMap control to display around 2000 lines on the map.

In pseudo code I do the following : (from and to contains the latitude and longitudes, the Arc object is the 'line' in my database)

foreach (Arc arc in arcs)
{
                    
                    MapLine line = new MapLine()
                    {
                        Point1 = new Location(from[1], from[0]),
                        Point2 = new Location(to[1], to[0]),
                        Stroke = new SolidColorBrush(Colors.Red),
                        StrokeThickness = 2
                    };
                   
                    this.InformationLayer.Items.Add(line);
}

When I add more than about 200 MapLines, the performance drops dramatically. Is there anything I can do to increase this?

Help would be very appreciated!

Thanks

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 02 Mar 2011, 09:17 AM
Hello Ernstjan,

The Silverlight rendering speed depends on the common productivity of the PC (CPU, video card). More elements visible at the same time decrease productivity. If you need not  to have all 2000 lines visible at the same time and you can granulate your surface to decreese the number of the visible lines, then you can try to use DynamicLayer:

http://demos.telerik.com/silverlight/#Map/DynamicLayer

I've tested RadMap with 2000 lines in it and it doesn't seems too slow actually. The speed of panning is OK, zooming is a bit slow, but not dramatically.

Kind regards,
Andrey Murzov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Ernstjan
Top achievements
Rank 1
answered on 02 Mar 2011, 10:21 AM
Hi Andrew,

Thanks for you answer. In this case I need to display all the objects, so the DynamicLayer is not really an option for me..

I tried with 2000 objects as well, and performance is so-so.. I expected better performance to be honest..
When I add 8000 pinpoint (I have 2000 lines and 8000 pinpoints, I use it to show a railroad map of France) performance is not acceptable, but maybe I'm asking too much? Or there are better solutions to accomplish my needs?

I tested everything on a brand new computer with good specs (Win 7 64bits, core i7, 8GB RAM, NVIDIA GeForce GT 330M), so I think that cannot be the problem?

Thanks again.
0
Andrey
Telerik team
answered on 04 Mar 2011, 10:22 AM
Hello Ernstjan,

The 2000 lines and 8000 of the pinpoints is definitely too much to show at the same time. There is not solution for this scenario which could be used with map lines and pinpoints. 

But it seems to me that this task can be implemented using DynamicLayer. The DynamicLayer allows changing of the detalization level depends on the zoom level. If you will show all 8000 pin points at zoom level 1, then they will cover a whole area of the France and you even will not see a map behind the lines and pin points. So you can show just a few of them for level 1. When zoom level is increased you can show more details and so on. But when you increase zoom level the only part of the map is visible in the view port (not whole France area) and as result only part of lines and pushpins will be visible in view port in the moment. So the DynamicLayer will work in this case.

Regards,
Andrey Murzov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Map
Asked by
Ernstjan
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Ernstjan
Top achievements
Rank 1
Share this question
or