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.Opacity = 0.5;
If i assign the item into vi.ItemSource, the opacity works, but it is not using the virtualization.
5 Answers, 1 is accepted
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.
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.
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.
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!
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.