diff --git a/Caching/FileDbCache/Properties/AssemblyInfo.cs b/Caching/FileDbCache/Properties/AssemblyInfo.cs index 6a49486a..d22a03bf 100644 --- a/Caching/FileDbCache/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache/Properties/AssemblyInfo.cs b/Caching/ImageFileCache/Properties/AssemblyInfo.cs index 82e50bcb..452ba23c 100644 --- a/Caching/ImageFileCache/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/MapBase.Silverlight.WinRT.cs b/MapControl/MapBase.Silverlight.WinRT.cs index c772af1a..fffbd1a7 100644 --- a/MapControl/MapBase.Silverlight.WinRT.cs +++ b/MapControl/MapBase.Silverlight.WinRT.cs @@ -19,6 +19,30 @@ namespace MapControl public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register( "Foreground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Black))); + public static readonly DependencyProperty CenterProperty = DependencyProperty.Register( + "Center", typeof(Location), typeof(MapBase), new PropertyMetadata(new Location(), + (o, e) => ((MapBase)o).CenterPropertyChanged((Location)e.NewValue))); + + public static readonly DependencyProperty TargetCenterProperty = DependencyProperty.Register( + "TargetCenter", typeof(Location), typeof(MapBase), new PropertyMetadata(new Location(), + (o, e) => ((MapBase)o).TargetCenterPropertyChanged((Location)e.NewValue))); + + public static readonly DependencyProperty ZoomLevelProperty = DependencyProperty.Register( + "ZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, + (o, e) => ((MapBase)o).ZoomLevelPropertyChanged((double)e.NewValue))); + + public static readonly DependencyProperty TargetZoomLevelProperty = DependencyProperty.Register( + "TargetZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, + (o, e) => ((MapBase)o).TargetZoomLevelPropertyChanged((double)e.NewValue))); + + public static readonly DependencyProperty HeadingProperty = DependencyProperty.Register( + "Heading", typeof(double), typeof(MapBase), new PropertyMetadata(0d, + (o, e) => ((MapBase)o).HeadingPropertyChanged((double)e.NewValue))); + + public static readonly DependencyProperty TargetHeadingProperty = DependencyProperty.Register( + "TargetHeading", typeof(double), typeof(MapBase), new PropertyMetadata(0d, + (o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue))); + partial void Initialize() { Background = new SolidColorBrush(Colors.Transparent); diff --git a/MapControl/MapBase.WPF.cs b/MapControl/MapBase.WPF.cs index 40cc9b42..710d1f7f 100644 --- a/MapControl/MapBase.WPF.cs +++ b/MapControl/MapBase.WPF.cs @@ -13,6 +13,36 @@ namespace MapControl public static readonly DependencyProperty ForegroundProperty = System.Windows.Controls.Control.ForegroundProperty.AddOwner(typeof(MapBase)); + public static readonly DependencyProperty CenterProperty = DependencyProperty.Register( + "Center", typeof(Location), typeof(MapBase), new FrameworkPropertyMetadata( + new Location(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, + (o, e) => ((MapBase)o).CenterPropertyChanged((Location)e.NewValue))); + + public static readonly DependencyProperty TargetCenterProperty = DependencyProperty.Register( + "TargetCenter", typeof(Location), typeof(MapBase), new FrameworkPropertyMetadata( + new Location(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, + (o, e) => ((MapBase)o).TargetCenterPropertyChanged((Location)e.NewValue))); + + public static readonly DependencyProperty ZoomLevelProperty = DependencyProperty.Register( + "ZoomLevel", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata( + 1d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, + (o, e) => ((MapBase)o).ZoomLevelPropertyChanged((double)e.NewValue))); + + public static readonly DependencyProperty TargetZoomLevelProperty = DependencyProperty.Register( + "TargetZoomLevel", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata( + 1d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, + (o, e) => ((MapBase)o).TargetZoomLevelPropertyChanged((double)e.NewValue))); + + public static readonly DependencyProperty HeadingProperty = DependencyProperty.Register( + "Heading", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata( + 0d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, + (o, e) => ((MapBase)o).HeadingPropertyChanged((double)e.NewValue))); + + public static readonly DependencyProperty TargetHeadingProperty = DependencyProperty.Register( + "TargetHeading", typeof(double), typeof(MapBase), new FrameworkPropertyMetadata( + 0d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, + (o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue))); + static MapBase() { UIElement.ClipToBoundsProperty.OverrideMetadata( diff --git a/MapControl/MapBase.cs b/MapControl/MapBase.cs index dc69d0e2..9d4f4caf 100644 --- a/MapControl/MapBase.cs +++ b/MapControl/MapBase.cs @@ -43,18 +43,6 @@ namespace MapControl "TileOpacity", typeof(double), typeof(MapBase), new PropertyMetadata(1d, (o, e) => ((MapBase)o).tileContainer.Opacity = (double)e.NewValue)); - public static readonly DependencyProperty CenterProperty = DependencyProperty.Register( - "Center", typeof(Location), typeof(MapBase), new PropertyMetadata(new Location(), - (o, e) => ((MapBase)o).CenterPropertyChanged((Location)e.NewValue))); - - public static readonly DependencyProperty TargetCenterProperty = DependencyProperty.Register( - "TargetCenter", typeof(Location), typeof(MapBase), new PropertyMetadata(new Location(), - (o, e) => ((MapBase)o).TargetCenterPropertyChanged((Location)e.NewValue))); - - internal static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register( - "CenterPoint", typeof(Point), typeof(MapBase), new PropertyMetadata(new Point(), - (o, e) => ((MapBase)o).CenterPointPropertyChanged((Point)e.NewValue))); - public static readonly DependencyProperty MinZoomLevelProperty = DependencyProperty.Register( "MinZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, (o, e) => ((MapBase)o).MinZoomLevelPropertyChanged((double)e.NewValue))); @@ -63,25 +51,13 @@ namespace MapControl "MaxZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(18d, (o, e) => ((MapBase)o).MaxZoomLevelPropertyChanged((double)e.NewValue))); - public static readonly DependencyProperty ZoomLevelProperty = DependencyProperty.Register( - "ZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, - (o, e) => ((MapBase)o).ZoomLevelPropertyChanged((double)e.NewValue))); - - public static readonly DependencyProperty TargetZoomLevelProperty = DependencyProperty.Register( - "TargetZoomLevel", typeof(double), typeof(MapBase), new PropertyMetadata(1d, - (o, e) => ((MapBase)o).TargetZoomLevelPropertyChanged((double)e.NewValue))); - - public static readonly DependencyProperty HeadingProperty = DependencyProperty.Register( - "Heading", typeof(double), typeof(MapBase), new PropertyMetadata(0d, - (o, e) => ((MapBase)o).HeadingPropertyChanged((double)e.NewValue))); - - public static readonly DependencyProperty TargetHeadingProperty = DependencyProperty.Register( - "TargetHeading", typeof(double), typeof(MapBase), new PropertyMetadata(0d, - (o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue))); - public static readonly DependencyProperty CenterScaleProperty = DependencyProperty.Register( "CenterScale", typeof(double), typeof(MapBase), null); + internal static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register( + "CenterPoint", typeof(Point), typeof(MapBase), new PropertyMetadata(new Point(), + (o, e) => ((MapBase)o).CenterPointPropertyChanged((Point)e.NewValue))); + private readonly TileContainer tileContainer = new TileContainer(); private readonly MapTransform mapTransform = new MercatorTransform(); private readonly MatrixTransform scaleTransform = new MatrixTransform(); diff --git a/MapControl/MapImageLayer.cs b/MapControl/MapImageLayer.cs index 299566b7..36d6422b 100644 --- a/MapControl/MapImageLayer.cs +++ b/MapControl/MapImageLayer.cs @@ -27,13 +27,13 @@ namespace MapControl /// public class MapImageLayer : MapPanel { - private static readonly DependencyProperty RelativeImageSizeProperty = DependencyProperty.Register( + public static readonly DependencyProperty RelativeImageSizeProperty = DependencyProperty.Register( "RelativeImageSize", typeof(double), typeof(MapImageLayer), new PropertyMetadata(1d)); private readonly DispatcherTimer updateTimer; private string uriFormat; - private bool updateInProgress; private int currentImageIndex; + private bool updateInProgress; public MapImageLayer() { @@ -180,7 +180,7 @@ namespace MapControl private void UpdateImage(double west, double east, double south, double north, ImageSource image) { var mapImage = (MapImage)Children[currentImageIndex]; - mapImage.BeginAnimation(Image.OpacityProperty, + mapImage.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation { To = 0d, @@ -197,7 +197,7 @@ namespace MapControl mapImage.South = south; mapImage.North = north; mapImage.Source = image; - mapImage.BeginAnimation(Image.OpacityProperty, new DoubleAnimation(1d, Tile.AnimationDuration)); + mapImage.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(1d, Tile.AnimationDuration)); } } } diff --git a/MapControl/MapPanel.cs b/MapControl/MapPanel.cs index 5fbba49e..d8056dc9 100644 --- a/MapControl/MapPanel.cs +++ b/MapControl/MapPanel.cs @@ -73,6 +73,8 @@ namespace MapControl protected override Size MeasureOverride(Size availableSize) { + availableSize = new Size(double.PositiveInfinity, double.PositiveInfinity); + foreach (UIElement element in InternalChildren) { element.Measure(availableSize); diff --git a/MapControl/Properties/AssemblyInfo.cs b/MapControl/Properties/AssemblyInfo.cs index cfaa3804..f033b948 100644 --- a/MapControl/Properties/AssemblyInfo.cs +++ b/MapControl/Properties/AssemblyInfo.cs @@ -15,8 +15,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/TileImageLoader.WPF.cs b/MapControl/TileImageLoader.WPF.cs index 5bfd0436..8a53f789 100644 --- a/MapControl/TileImageLoader.WPF.cs +++ b/MapControl/TileImageLoader.WPF.cs @@ -190,7 +190,7 @@ namespace MapControl { if (uri.Scheme == "file") // create from FileStream as creating from URI leaves the file open { - image = CreateImage(uri.AbsolutePath); + image = CreateImage(uri.LocalPath); } else { @@ -259,7 +259,7 @@ namespace MapControl { try { - using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read)) + using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read)) { image = BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad); } diff --git a/MapControl/WinRT/Properties/AssemblyInfo.cs b/MapControl/WinRT/Properties/AssemblyInfo.cs index d12178a8..5f0acb25 100644 --- a/MapControl/WinRT/Properties/AssemblyInfo.cs +++ b/MapControl/WinRT/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs index 6af1ccf9..3ae95416 100644 --- a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs index f2b51cca..55b9e6c3 100644 --- a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs index 4b99252e..50b5c2a2 100644 --- a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs index 7f761229..4d1d676d 100644 --- a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index d753faa5..aacf4da6 100644 --- a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.10.1")] -[assembly: AssemblyFileVersion("1.10.1")] +[assembly: AssemblyVersion("1.11.0")] +[assembly: AssemblyFileVersion("1.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)]