mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
15 lines
459 B
C#
15 lines
459 B
C#
using Avalonia.Animation;
|
|
|
|
namespace MapControl
|
|
{
|
|
public class LocationAnimator : InterpolatingAnimator<Location>
|
|
{
|
|
public override Location Interpolate(double progress, Location oldValue, Location newValue)
|
|
{
|
|
return new Location(
|
|
(1d - progress) * oldValue.Latitude + progress * newValue.Latitude,
|
|
(1d - progress) * oldValue.Longitude + progress * newValue.Longitude);
|
|
}
|
|
}
|
|
}
|