mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Version 4.6.1: Removed obsolete MapProjection.TranslateLocation method
This commit is contained in:
parent
fa2c561bc9
commit
b12155e498
15 changed files with 19 additions and 73 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue