diff --git a/FileDbCache/UWP/Properties/AssemblyInfo.cs b/FileDbCache/UWP/Properties/AssemblyInfo.cs index e36cb138..143c6db6 100644 --- a/FileDbCache/UWP/Properties/AssemblyInfo.cs +++ b/FileDbCache/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/FileDbCache/WPF/Properties/AssemblyInfo.cs b/FileDbCache/WPF/Properties/AssemblyInfo.cs index 0e3c8a61..cbe9711a 100644 --- a/FileDbCache/WPF/Properties/AssemblyInfo.cs +++ b/FileDbCache/WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MBTiles/UWP/Properties/AssemblyInfo.cs b/MBTiles/UWP/Properties/AssemblyInfo.cs index d474d2eb..9be431b6 100644 --- a/MBTiles/UWP/Properties/AssemblyInfo.cs +++ b/MBTiles/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MBTiles/WPF/Properties/AssemblyInfo.cs b/MBTiles/WPF/Properties/AssemblyInfo.cs index c14b2b3a..27f1064b 100644 --- a/MBTiles/WPF/Properties/AssemblyInfo.cs +++ b/MBTiles/WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/Shared/AzimuthalProjection.cs b/MapControl/Shared/AzimuthalProjection.cs index 380b6a75..cfb41438 100644 --- a/MapControl/Shared/AzimuthalProjection.cs +++ b/MapControl/Shared/AzimuthalProjection.cs @@ -30,16 +30,6 @@ namespace MapControl return new Point(ViewportScale, ViewportScale); } - public override Location TranslateLocation(Location location, Point translation) - { - var scaleY = ViewportScale * TrueScale; - var scaleX = scaleY * Math.Cos(location.Latitude * Math.PI / 180d); - - return new Location( - location.Latitude - translation.Y / scaleY, - location.Longitude + translation.X / scaleX); - } - public override Rect BoundingBoxToRect(BoundingBox boundingBox) { var cbbox = boundingBox as CenteredBoundingBox; diff --git a/MapControl/Shared/EquirectangularProjection.cs b/MapControl/Shared/EquirectangularProjection.cs index 719cb488..0b4d2fe9 100644 --- a/MapControl/Shared/EquirectangularProjection.cs +++ b/MapControl/Shared/EquirectangularProjection.cs @@ -42,12 +42,5 @@ namespace MapControl { return new Location(point.Y, point.X); } - - public override Location TranslateLocation(Location location, Point translation) - { - return new Location( - location.Latitude - translation.Y / ViewportScale, - location.Longitude + translation.X / ViewportScale); - } } } diff --git a/MapControl/Shared/MapBase.cs b/MapControl/Shared/MapBase.cs index 428482fd..98109256 100644 --- a/MapControl/Shared/MapBase.cs +++ b/MapControl/Shared/MapBase.cs @@ -288,20 +288,8 @@ namespace MapControl if (translation.X != 0d || translation.Y != 0d) { - if (Heading != 0d) - { - var cos = Math.Cos(Heading * Math.PI / 180d); - var sin = Math.Sin(Heading * Math.PI / 180d); - - translation = new Point( - translation.X * cos + translation.Y * sin, - translation.Y * cos - translation.X * sin); - } - - translation.X = -translation.X; - translation.Y = -translation.Y; - - Center = MapProjection.TranslateLocation(Center, translation); + Center = MapProjection.ViewportPointToLocation( + new Point(viewportCenter.X - translation.X, viewportCenter.Y - translation.Y)); } } diff --git a/MapControl/Shared/MapProjection.cs b/MapControl/Shared/MapProjection.cs index 84660786..ff14a52e 100644 --- a/MapControl/Shared/MapProjection.cs +++ b/MapControl/Shared/MapProjection.cs @@ -88,11 +88,6 @@ namespace MapControl /// public abstract Location PointToLocation(Point point); - /// - /// Translates a Location in geographic coordinates by the specified small amount in viewport coordinates. - /// - public abstract Location TranslateLocation(Location location, Point translation); - /// /// Transforms a BoundingBox in geographic coordinates to a Rect in cartesian map coordinates. /// diff --git a/MapControl/Shared/WebMercatorProjection.cs b/MapControl/Shared/WebMercatorProjection.cs index ea950b05..24938817 100644 --- a/MapControl/Shared/WebMercatorProjection.cs +++ b/MapControl/Shared/WebMercatorProjection.cs @@ -50,16 +50,6 @@ namespace MapControl point.X / TrueScale); } - public override Location TranslateLocation(Location location, Point translation) - { - var scaleX = TrueScale * ViewportScale; - var scaleY = scaleX / Math.Cos(location.Latitude * Math.PI / 180d); - - return new Location( - location.Latitude - translation.Y / scaleY, - location.Longitude + translation.X / scaleX); - } - public static double LatitudeToY(double latitude) { if (latitude <= -90d) diff --git a/MapControl/Shared/WorldMercatorProjection.cs b/MapControl/Shared/WorldMercatorProjection.cs index 7d1085e3..475d71ee 100644 --- a/MapControl/Shared/WorldMercatorProjection.cs +++ b/MapControl/Shared/WorldMercatorProjection.cs @@ -57,16 +57,6 @@ namespace MapControl point.X / TrueScale); } - public override Location TranslateLocation(Location location, Point translation) - { - var scaleX = TrueScale * ViewportScale; - var scaleY = scaleX / Math.Cos(location.Latitude * Math.PI / 180d); - - return new Location( - location.Latitude - translation.Y / scaleY, - location.Longitude + translation.X / scaleX); - } - public static double LatitudeToY(double latitude) { if (latitude <= -90d) diff --git a/MapControl/UWP/Properties/AssemblyInfo.cs b/MapControl/UWP/Properties/AssemblyInfo.cs index e04f14c4..19928c47 100644 --- a/MapControl/UWP/Properties/AssemblyInfo.cs +++ b/MapControl/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/WPF/Properties/AssemblyInfo.cs b/MapControl/WPF/Properties/AssemblyInfo.cs index 3b9f196d..5195fc33 100644 --- a/MapControl/WPF/Properties/AssemblyInfo.cs +++ b/MapControl/WPF/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/UniversalApp/Properties/AssemblyInfo.cs b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs index 9fb632a8..6822cfd2 100644 --- a/SampleApps/UniversalApp/Properties/AssemblyInfo.cs +++ b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: ComVisible(false)] diff --git a/SampleApps/UniversalApp/UniversalApp.csproj b/SampleApps/UniversalApp/UniversalApp.csproj index c4069022..a65994a2 100644 --- a/SampleApps/UniversalApp/UniversalApp.csproj +++ b/SampleApps/UniversalApp/UniversalApp.csproj @@ -156,7 +156,7 @@ - 6.0.7 + 6.0.8 diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index 787e542a..d7d32aca 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("© 2018 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.6.0")] -[assembly: AssemblyFileVersion("4.6.0")] +[assembly: AssemblyVersion("4.6.1")] +[assembly: AssemblyFileVersion("4.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)]