mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 4.6.1: Removed obsolete MapProjection.TranslateLocation method
This commit is contained in:
parent
fa2c561bc9
commit
b12155e498
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,11 +88,6 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public abstract Location PointToLocation(Point point);
|
||||
|
||||
/// <summary>
|
||||
/// Translates a Location in geographic coordinates by the specified small amount in viewport coordinates.
|
||||
/// </summary>
|
||||
public abstract Location TranslateLocation(Location location, Point translation);
|
||||
|
||||
/// <summary>
|
||||
/// Transforms a BoundingBox in geographic coordinates to a Rect in cartesian map coordinates.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.0.7</Version>
|
||||
<Version>6.0.8</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue