Hi
I am a new Thinkgeo WPF developer. I have an issue concerning storyboard animations on markers : they are laggy and seems to draw heavy load on the cpu. I have made a small sample application, where a marker is added to a SimpleMarkerOverlay. The marker’s content is a user control, which has a simple (RenderTransform) scaletransform storyboard. The result is not the usual smooth wpf animation, but jerky motion, and 5 % cpu utilization.
I have a video and a sample project, but this page does not allow me to attach it.
Is this an expected behavior?
Is there anything I can do to improve it?
Best regards
Jonas
Laggy, cpu intensive storyboard animations
Hi Jonas,
Warm welcome to map suite forums!
In order to have a further look, please send your video and sample project to us. The below link shows how to send sample/data for us.
wiki.thinkgeo.com/wiki/Map_S…to_Support
Hope we can help on you.
Thanks,
Troy
Hi Jonas,
Thanks for the sample, it helps us a lot to verify your issue.
In WPF Desktop Edition, the map
“SnapsToDevicePixels”
property has been set “True” as default. It is caused that the animation effect
looks like jerky, so I think you can set “SnapsToDevicePixels” to “False” in “MainWindow.xaml.cs”
as following statements:
private void Map_Loaded(object sender, RoutedEventArgs e)
{
SimpleMarkerOverlay overlay = new SimpleMarkerOverlay();
overlay.Markers.Add(new Marker(0, 0) { Content = new Test(), SnapsToDevicePixels = false});
Map.Overlays.Add(overlay);
Map.Refresh();
}
Please let us know if any questions.
Thanks,
Troy
Great! A quick answer that seems to have solved the issue. Thanks a lot.
Jonas,
You’ve welcome.
Great to hear it helps.Any other questions, don’t hesitate to let us know.
Thanks,
Troy