本文整理汇总了C#中MapPoint.MoveTo方法的典型用法代码示例。如果您正苦于以下问题:C# MapPoint.MoveTo方法的具体用法?C# MapPoint.MoveTo怎么用?C# MapPoint.MoveTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapPoint
的用法示例。
在下文中一共展示了MapPoint.MoveTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AnimateGraphic
private async Task AnimateGraphic()
{
MapPoint startPoint = _userInteractionLayer.Graphics[0].Geometry as MapPoint;
MapPoint finishPoint = _userInteractionLayer.Graphics[1].Geometry as MapPoint;
MapPoint animatingPoint = new MapPoint(startPoint.X, startPoint.Y);
_animatingLayer.Graphics.Add(new Graphic() { Geometry = animatingPoint});
animationTimer= new DispatcherTimer();
animationTimer.Interval = TimeSpan.FromMilliseconds(33);
animateStartTime = DateTime.Now;
animationTimer.Tick += (s, ex) =>
{
double fraction = (DateTime.Now - animateStartTime).TotalMilliseconds / animationDuration;
fraction = QuinticEasingInOut(fraction, 0, 1, 1);
var x = (finishPoint.X - startPoint.X) * fraction + startPoint.X;
var y = (finishPoint.Y - startPoint.Y) * fraction + startPoint.Y;
animatingPoint.MoveTo(x, y);
};
animationTimer.Start();
}