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

Virtualization Layer opacity and data template

5 Answers 20 Views
Map
This is a migrated thread and some comments may be shown as answers.
Iman
Top achievements
Rank 1
Iman asked on 27 Jun 2018, 01:00 AM

Hi, 

Currently i'm trying to implement virtualization layer with IMapVirtualizationSource to improve the performance of plotting in map.

it is working well.

my question is, is it possible to use data template for this layer? because when i tried to implement data template, it's not showing anything. if i create the data using ellipse object like in documentation, it shows all the data fine.

I follow the guide from this: https://docs.telerik.com/devtools/wpf/controls/radmap/features/virtualization-layer

 

My other question is, is it possible to change the layer opacity? because no matter what value i assign, it is still not changing the opacity

this is how i change the opacity:
    var vi = new VirtualizationLayer();
            vi.ZoomLevelGridList.Add(new ZoomLevelGrid(6));
            vi.Opacity = 0.5;

 

If i assign the item into vi.ItemSource, the opacity works, but it is not using the virtualization.

 

Thanks.

5 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 29 Jun 2018, 01:35 PM
Hello Iman,

May I ask you to check out the WrapAroundAndVirtualization RadMap SDK example? I tried setting the Opacity to the VirtualizationLayer and it is working as expected. Can you compare it with the setup at your side and see how it differs?

Additionally the example shows how you can use the ItemTemplateSelector property of the VirtualizationLayer in order to conditionally provide different datatemplates.

I hope you find this helpful.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Iman
Top achievements
Rank 1
answered on 02 Jul 2018, 03:29 AM

Hi Vladimir,

The example is using VisualizationLayer with IMapItemsVirtualizationSource. In my case, i use VirtualizationLayer with IMapVirtualizationSource.

I have tried using VisualizationLayer, it is working fine, opacity and templateselector. the only reason why i use VirtualizationLayer is, i think it is faster compare to VisualizationLayer.

 

Thank you,

Iman

0
Vladimir Stoyanov
Telerik team
answered on 04 Jul 2018, 03:31 PM
Hello Iman,

Please, excuse me for misunderstanding.

Allow me to point out that the RadMap control supports 2 visualization engine packages. The first one consists of 3 layers for visualization of the map objects: InformationLayer, DynamicLayer and VirtualizationLayer. Please, note that this is also the old package. The VisualizationLayer, on the other hand, replaces all 3 layers from the old one.

The reason that the Opacity of the VirtualizationLayer is not applied is that the VirtualizationLayer is internally creating InformationLayers in order to represent its Items. Instead you can set the Opacity of the individual items. As for the ItemTemplateSelector, I tested this on my side and it is working as intended. I am attaching the sample project here for your reference. Please check it out and let me know if it helps.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Iman
Top achievements
Rank 1
answered on 06 Jul 2018, 01:38 AM

Hi Vladimir,

Thank you for your reply. Yes, if i change the opacity for each of individual item, it is possible. the problem that i have is, my item list is closed to each other, it is intersect with each other, so the opacity  doesn't look good.

The problem that i have if i use visualization layer is, if there are many items close to each other, it becomes very slow, compare to just using information layer. I think the reason is because  it loads every time the location is changed. and because of there are many items on one location, the calculation takes time.

is there any trick to increase the calculation time for my case? i have tried to change the grid size into bigger size or smaller size.

I'll try the template selector.

Thanks for your help!

Iman

 

0
Vladimir Stoyanov
Telerik team
answered on 10 Jul 2018, 04:01 PM
Hello Iman,

The best way to increase the performance when using the control is to use virtualization. Have you tried that coupled with using the VisualizationLayer? You can check out the the SDK example that I linked in my first reply. Additionally, using the map shapes classes introduced for the visualizationlayer should provide a better performance. That said if there is a large number of items displayed, some performance hit is to be expected.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Map
Asked by
Iman
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Iman
Top achievements
Rank 1
Share this question
or