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

VisualizationLayer

2 Answers 25 Views
Map
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 2
Andrew asked on 31 Jul 2014, 10:18 AM
If I add items to a VisualizationLayer from c# nothing is displayed. However, it works using the same code with an InformationLayer. What do I need to do to get the VisualizationLayer to work?

Andrew

2 Answers, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 2
answered on 31 Jul 2014, 09:29 PM
I guess I need to create a MapVirtualizationSource to provide the data to the VisualizationLayer. However when I try and create a MapPolyline object in BackgroundItemsRequest I get an "The calling thread must be STA, because many UI components require this." error.

I can see you example code works but they only create one or two objects. I have several hundred thousand objects I need to display so the virtualisation is clearly critical.

Help! What am I doing wrong?

Andrew
0
Andrey
Telerik team
answered on 01 Aug 2014, 07:35 AM
Hi Andrew,

There are 2 visualization engines in the RadMap package.

The old implementation of the map objects' (points and shapes) visualization consists of 3 layers: InformationLayer, DynamicLayer and VirtualizationLayer.

The new visualization engine replaces all 3 layers with the new VisualizationLayer.

The MapPolyline object (like any other object inherited from the MapShape class) is designed to be used with old engine (i.e. InformationLayer) and it can't be used with new engine (i.e. VisualizationLayer).

I would recommend you to take a look into the following help topics:
- VisualizationLayer Map Shape Data
- VisualizationLayer Introduction

I would recommend you to use the Virtualization feature. It allows displaying only items which are in the viewport for better rendering performance. For more details you can take a look at the Map Shapes Virtualization article.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Map
Asked by
Andrew
Top achievements
Rank 2
Answers by
Andrew
Top achievements
Rank 2
Andrey
Telerik team
Share this question
or