mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 1.6.1: Fixed internal ZoomLevel, Center and Heading animation in MapBase.
This commit is contained in:
parent
99e218580d
commit
690c2071b1
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -7,21 +7,15 @@ using Windows.Foundation;
|
||||||
using Windows.UI;
|
using Windows.UI;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
using Windows.UI.Xaml.Media.Animation;
|
|
||||||
#else
|
#else
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
public partial class MapBase
|
public partial class MapBase
|
||||||
{
|
{
|
||||||
// Set FillBehavior.HoldEnd to prevent animation from returning
|
|
||||||
// to local value before invoking the Completed handler
|
|
||||||
private const FillBehavior AnimationFillBehavior = FillBehavior.HoldEnd;
|
|
||||||
|
|
||||||
public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register(
|
||||||
"Foreground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Black)));
|
"Foreground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Black)));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,11 @@
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
public partial class MapBase
|
public partial class MapBase
|
||||||
{
|
{
|
||||||
// FillBehavior must be set to Stop to re-enable local property values
|
|
||||||
private const FillBehavior AnimationFillBehavior = FillBehavior.Stop;
|
|
||||||
|
|
||||||
public static readonly DependencyProperty ForegroundProperty =
|
public static readonly DependencyProperty ForegroundProperty =
|
||||||
System.Windows.Controls.Control.ForegroundProperty.AddOwner(typeof(MapBase));
|
System.Windows.Controls.Control.ForegroundProperty.AddOwner(typeof(MapBase));
|
||||||
|
|
||||||
|
|
@ -31,6 +27,11 @@ namespace MapControl
|
||||||
AddVisualChild(tileContainer);
|
AddVisualChild(tileContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
partial void RemoveAnimation(DependencyProperty property)
|
||||||
|
{
|
||||||
|
BeginAnimation(property, null);
|
||||||
|
}
|
||||||
|
|
||||||
protected override int VisualChildrenCount
|
protected override int VisualChildrenCount
|
||||||
{
|
{
|
||||||
get { return base.VisualChildrenCount + 1; }
|
get { return base.VisualChildrenCount + 1; }
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void Initialize();
|
partial void Initialize();
|
||||||
|
partial void RemoveAnimation(DependencyProperty property);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raised when the current viewport has changed.
|
/// Raised when the current viewport has changed.
|
||||||
|
|
@ -610,7 +611,7 @@ namespace MapControl
|
||||||
To = new Point(targetCenter.Longitude, targetCenter.Latitude),
|
To = new Point(targetCenter.Longitude, targetCenter.Latitude),
|
||||||
Duration = AnimationDuration,
|
Duration = AnimationDuration,
|
||||||
EasingFunction = AnimationEasingFunction,
|
EasingFunction = AnimationEasingFunction,
|
||||||
FillBehavior = AnimationFillBehavior
|
FillBehavior = FillBehavior.HoldEnd
|
||||||
};
|
};
|
||||||
|
|
||||||
centerAnimation.Completed += CenterAnimationCompleted;
|
centerAnimation.Completed += CenterAnimationCompleted;
|
||||||
|
|
@ -628,6 +629,8 @@ namespace MapControl
|
||||||
|
|
||||||
InternalSetValue(CenterProperty, TargetCenter);
|
InternalSetValue(CenterProperty, TargetCenter);
|
||||||
InternalSetValue(CenterPointProperty, new Point(TargetCenter.Longitude, TargetCenter.Latitude));
|
InternalSetValue(CenterPointProperty, new Point(TargetCenter.Longitude, TargetCenter.Latitude));
|
||||||
|
RemoveAnimation(CenterPointProperty); // remove holding animation in WPF
|
||||||
|
|
||||||
ResetTransformOrigin();
|
ResetTransformOrigin();
|
||||||
UpdateTransform();
|
UpdateTransform();
|
||||||
}
|
}
|
||||||
|
|
@ -714,7 +717,7 @@ namespace MapControl
|
||||||
To = targetZoomLevel,
|
To = targetZoomLevel,
|
||||||
Duration = AnimationDuration,
|
Duration = AnimationDuration,
|
||||||
EasingFunction = AnimationEasingFunction,
|
EasingFunction = AnimationEasingFunction,
|
||||||
FillBehavior = AnimationFillBehavior
|
FillBehavior = FillBehavior.HoldEnd
|
||||||
};
|
};
|
||||||
|
|
||||||
zoomLevelAnimation.Completed += ZoomLevelAnimationCompleted;
|
zoomLevelAnimation.Completed += ZoomLevelAnimationCompleted;
|
||||||
|
|
@ -730,6 +733,8 @@ namespace MapControl
|
||||||
zoomLevelAnimation = null;
|
zoomLevelAnimation = null;
|
||||||
|
|
||||||
InternalSetValue(ZoomLevelProperty, TargetZoomLevel);
|
InternalSetValue(ZoomLevelProperty, TargetZoomLevel);
|
||||||
|
RemoveAnimation(ZoomLevelProperty); // remove holding animation in WPF
|
||||||
|
|
||||||
UpdateTransform();
|
UpdateTransform();
|
||||||
ResetTransformOrigin();
|
ResetTransformOrigin();
|
||||||
}
|
}
|
||||||
|
|
@ -789,7 +794,7 @@ namespace MapControl
|
||||||
By = delta,
|
By = delta,
|
||||||
Duration = AnimationDuration,
|
Duration = AnimationDuration,
|
||||||
EasingFunction = AnimationEasingFunction,
|
EasingFunction = AnimationEasingFunction,
|
||||||
FillBehavior = AnimationFillBehavior
|
FillBehavior = FillBehavior.HoldEnd
|
||||||
};
|
};
|
||||||
|
|
||||||
headingAnimation.Completed += HeadingAnimationCompleted;
|
headingAnimation.Completed += HeadingAnimationCompleted;
|
||||||
|
|
@ -806,6 +811,8 @@ namespace MapControl
|
||||||
headingAnimation = null;
|
headingAnimation = null;
|
||||||
|
|
||||||
InternalSetValue(HeadingProperty, TargetHeading);
|
InternalSetValue(HeadingProperty, TargetHeading);
|
||||||
|
RemoveAnimation(HeadingProperty); // remove holding animation in WPF
|
||||||
|
|
||||||
UpdateTransform();
|
UpdateTransform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ using System.Windows;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCompany("Clemens Fischer")]
|
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyVersion("1.6.0")]
|
[assembly: AssemblyVersion("1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0")]
|
[assembly: AssemblyFileVersion("1.6.1")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue