Hello,
I have a VisualizationLayer bound to a collection of objects. I've defined a MapEllipseView for (some of) the objects in the collection via an ItemTemplateSelector.
The issue I have is that when I add items to the collection the ellipses are only rendered on the map at the completion of a zoom animation.
How can I get them to appear straight away after they are added in the collection?
Thanks,
Chris
6 Answers, 1 is accepted
We tried to replicate your scenario. Please find an isolation where you can add viewmodels on a button click. VisualizationLayer is bound to collection of objects and based on the object type, the selector selects MapEllipseView-based template or MapPathView-based one. You can zoom with mouse and use Enter key (if the focus is on the button) to refresh the models. We didn't notice the ellipses waiting for zoom animation finished in order to render.
Is it possible for you to change the application in a way the behavior you describe is reproducible ?
Regards,
Petar Mladenov
Telerik by Progress

Hi Petar,
Thanks for looking into this. I downloaded your project, ran it without making any modifications and was presented with a map with no ellipses on. I then zoomed one step on my mouse's scroll wheel and several ellipses appeared, which is exactly the bug I am experiencing. I'm running this using VS 2015 on Windows 10 Pro and I've installed the latest version of Telerik (2017 R1).



Thank you for your details. This appears to be a regression issue we have introduced in R2 2016. We logged it in our feedback portal where you can track its status.
If applicable in your scenario, you can try using and modifying EllipseData objects in code instead of databinding and MapEllipseViews. For example creating shape data objects on code behind would look like:
for
(
int
i = 0; i < 10; i++)
{
EllipseData data =
new
EllipseData();
data.Width = 10;
data.Height = 20;
data.Location =
new
Location(r.Next(0, 40), r.Next(0, 60));
this
.vislayer.Items.Add(data);
}
Regards,
Petar Mladenov
Telerik by Progress