diff --git a/Caching/FileDbCache.WPF/FileDbCache.cs b/Caching/FileDbCache.WPF/FileDbCache.cs index d7f21209..40d532d9 100644 --- a/Caching/FileDbCache.WPF/FileDbCache.cs +++ b/Caching/FileDbCache.WPF/FileDbCache.cs @@ -112,7 +112,7 @@ namespace MapControl.Caching public override DefaultCacheCapabilities DefaultCacheCapabilities { - get { return DefaultCacheCapabilities.InMemoryProvider | DefaultCacheCapabilities.AbsoluteExpirations | DefaultCacheCapabilities.SlidingExpirations; } + get { return DefaultCacheCapabilities.AbsoluteExpirations | DefaultCacheCapabilities.SlidingExpirations; } } public override object this[string key] @@ -266,16 +266,16 @@ namespace MapControl.Caching } } - public override void Set(CacheItem item, CacheItemPolicy policy) - { - Set(item.Key, item.Value, policy, item.RegionName); - } - public override void Set(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) { Set(key, value, new CacheItemPolicy { AbsoluteExpiration = absoluteExpiration }, regionName); } + public override void Set(CacheItem item, CacheItemPolicy policy) + { + Set(item.Key, item.Value, policy, item.RegionName); + } + public override object AddOrGetExisting(string key, object value, CacheItemPolicy policy, string regionName = null) { var oldValue = Get(key, regionName); @@ -285,6 +285,11 @@ namespace MapControl.Caching return oldValue; } + public override object AddOrGetExisting(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) + { + return AddOrGetExisting(key, value, new CacheItemPolicy { AbsoluteExpiration = absoluteExpiration }, regionName); + } + public override CacheItem AddOrGetExisting(CacheItem item, CacheItemPolicy policy) { var oldItem = GetCacheItem(item.Key, item.RegionName); @@ -294,11 +299,6 @@ namespace MapControl.Caching return oldItem; } - public override object AddOrGetExisting(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) - { - return AddOrGetExisting(key, value, new CacheItemPolicy { AbsoluteExpiration = absoluteExpiration }, regionName); - } - public override object Remove(string key, string regionName = null) { var oldValue = Get(key, regionName); @@ -395,7 +395,7 @@ namespace MapControl.Caching } catch (Exception ex) { - Debug.WriteLine("FileDbCache: Creating database {0}: {1}", path, ex.Message); + Debug.WriteLine("FileDbCache: Failed creating database {0}: {1}", path, ex.Message); } return false; diff --git a/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs b/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs index 251c59dd..7d5d7032 100644 --- a/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs b/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs index 667bcf76..f516054d 100644 --- a/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache.WPF/ImageFileCache.cs b/Caching/ImageFileCache.WPF/ImageFileCache.cs index 1486eceb..c5e10675 100644 --- a/Caching/ImageFileCache.WPF/ImageFileCache.cs +++ b/Caching/ImageFileCache.WPF/ImageFileCache.cs @@ -70,7 +70,7 @@ namespace MapControl.Caching public override DefaultCacheCapabilities DefaultCacheCapabilities { - get { return DefaultCacheCapabilities.InMemoryProvider; } + get { return DefaultCacheCapabilities.None; } } public override object this[string key] @@ -137,7 +137,7 @@ namespace MapControl.Caching } catch (Exception ex) { - Debug.WriteLine("ImageFileCache: Reading {0}: {1}", path, ex.Message); + Debug.WriteLine("ImageFileCache: Failed reading {0}: {1}", path, ex.Message); } } } @@ -193,20 +193,20 @@ namespace MapControl.Caching } catch (Exception ex) { - Debug.WriteLine("ImageFileCache: Writing {0}: {1}", path, ex.Message); + Debug.WriteLine("ImageFileCache: Failed writing {0}: {1}", path, ex.Message); } } - public override void Set(CacheItem item, CacheItemPolicy policy) - { - Set(item.Key, item.Value, policy, item.RegionName); - } - public override void Set(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) { Set(key, value, new CacheItemPolicy { AbsoluteExpiration = absoluteExpiration }, regionName); } + public override void Set(CacheItem item, CacheItemPolicy policy) + { + Set(item.Key, item.Value, policy, item.RegionName); + } + public override object AddOrGetExisting(string key, object value, CacheItemPolicy policy, string regionName = null) { var oldValue = Get(key, regionName); @@ -216,6 +216,11 @@ namespace MapControl.Caching return oldValue; } + public override object AddOrGetExisting(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) + { + return AddOrGetExisting(key, value, new CacheItemPolicy { AbsoluteExpiration = absoluteExpiration }, regionName); + } + public override CacheItem AddOrGetExisting(CacheItem item, CacheItemPolicy policy) { var oldItem = GetCacheItem(item.Key, item.RegionName); @@ -225,11 +230,6 @@ namespace MapControl.Caching return oldItem; } - public override object AddOrGetExisting(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) - { - return AddOrGetExisting(key, value, new CacheItemPolicy { AbsoluteExpiration = absoluteExpiration }, regionName); - } - public override object Remove(string key, string regionName = null) { if (key == null) @@ -254,7 +254,7 @@ namespace MapControl.Caching } catch (Exception ex) { - Debug.WriteLine("ImageFileCache: Removing {0}: {1}", path, ex.Message); + Debug.WriteLine("ImageFileCache: Failed removing {0}: {1}", path, ex.Message); } } @@ -281,7 +281,7 @@ namespace MapControl.Caching } catch (Exception ex) { - Debug.WriteLine("ImageFileCache: Finding {0}: {1}", path, ex.Message); + Debug.WriteLine("ImageFileCache: Failed finding {0}: {1}", path, ex.Message); } return null; diff --git a/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs b/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs index 7dfbba8c..f3dfec3a 100644 --- a/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs b/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs index b2ad0fd0..3010bdce 100644 --- a/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl VS2015.sln b/MapControl VS2015.sln index 61d9852b..152f2071 100644 --- a/MapControl VS2015.sln +++ b/MapControl VS2015.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileDbCache.WinRT", "Caching\FileDbCache.WinRT\FileDbCache.WinRT.csproj", "{C7BF2B18-CC74-430B-BCB2-600304EFA3D8}" EndProject diff --git a/MapControl/MapBase.cs b/MapControl/MapBase.cs index 8e563400..46abc04f 100644 --- a/MapControl/MapBase.cs +++ b/MapControl/MapBase.cs @@ -618,6 +618,7 @@ namespace MapControl // animate private CenterPoint property by PointAnimation centerAnimation = new PointAnimation { + From = mapTransform.Transform(Center), To = mapTransform.Transform(new Location( targetCenter.Latitude, Location.NearestLongitude(targetCenter.Longitude, Center.Longitude))), @@ -647,6 +648,7 @@ namespace MapControl private void CenterPointPropertyChanged(Point centerPoint) { + System.Diagnostics.Debug.WriteLine("CenterPoint: {0}", centerPoint); if (!internalPropertyChange) { centerPoint.X = Location.NormalizeLongitude(centerPoint.X); @@ -862,12 +864,7 @@ namespace MapControl { base.OnViewportChanged(); - var viewportChanged = ViewportChanged; - - if (viewportChanged != null) - { - viewportChanged(this, EventArgs.Empty); - } + ViewportChanged?.Invoke(this, EventArgs.Empty); } } } diff --git a/MapControl/Properties/AssemblyInfo.cs b/MapControl/Properties/AssemblyInfo.cs index 75616e74..17ca942b 100644 --- a/MapControl/Properties/AssemblyInfo.cs +++ b/MapControl/Properties/AssemblyInfo.cs @@ -14,8 +14,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/TileImageLoader.WPF.cs b/MapControl/TileImageLoader.WPF.cs index 158971d1..27c93a84 100644 --- a/MapControl/TileImageLoader.WPF.cs +++ b/MapControl/TileImageLoader.WPF.cs @@ -271,11 +271,6 @@ namespace MapControl return image; } - private static string TileKey(TileSource tileSource, Tile tile) - { - return string.Format("{0:X}/{1:X}/{2:X}/{3:X}", tileSource.GetHashCode(), tile.ZoomLevel, tile.XIndex, tile.Y); - } - private static string CacheKey(string sourceName, Tile tile) { return string.IsNullOrEmpty(sourceName) ? null : string.Format("{0}/{1}/{2}/{3}", sourceName, tile.ZoomLevel, tile.XIndex, tile.Y); diff --git a/MapControl/WinRT/Properties/AssemblyInfo.cs b/MapControl/WinRT/Properties/AssemblyInfo.cs index 60a343f0..264a2138 100644 --- a/MapControl/WinRT/Properties/AssemblyInfo.cs +++ b/MapControl/WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs b/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs index b79570d7..54749dc0 100644 --- a/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.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 96a02167..e9b98af3 100644 --- a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs index 0713b53e..4d6693a7 100644 --- a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs index 213687f2..8df0737b 100644 --- a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: ComVisible(false)] diff --git a/SampleApps/UniversalApp/Properties/AssemblyInfo.cs b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs index 5f42ef9f..fe1d8d46 100644 --- a/SampleApps/UniversalApp/Properties/AssemblyInfo.cs +++ b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index df2b8354..cff5e55d 100644 --- a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2016 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.10.0")] -[assembly: AssemblyFileVersion("2.10.0")] +[assembly: AssemblyVersion("2.11.0")] +[assembly: AssemblyFileVersion("2.11.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/WpfApplication.csproj b/SampleApps/WpfApplication/WpfApplication.csproj index 132e1dff..0aaa9c92 100644 --- a/SampleApps/WpfApplication/WpfApplication.csproj +++ b/SampleApps/WpfApplication/WpfApplication.csproj @@ -1,5 +1,5 @@  - + Debug @@ -13,6 +13,7 @@ 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 + AnyCPU