mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Fixed LatLonBox rotation
This commit is contained in:
parent
7208cc71bd
commit
ceb19a9ae4
2 changed files with 6 additions and 4 deletions
|
|
@ -193,11 +193,11 @@ namespace MapControl
|
|||
// Additional rotation caused by the projection, calculated as mean value
|
||||
// of the two angles measured relative to the east and north axis.
|
||||
//
|
||||
var r1 = (Math.Atan2(dy1, dx1) * 180d / Math.PI + 180d) % 360d - 180d;
|
||||
var r2 = (Math.Atan2(-dx2, dy2) * 180d / Math.PI + 180d) % 360d - 180d;
|
||||
var r1 = Math.Atan2(dy1, dx1) * 180d / Math.PI;
|
||||
var r2 = Math.Atan2(-dx2, dy2) * 180d / Math.PI;
|
||||
|
||||
rect = new Rect(x, y, width, height);
|
||||
rotation = latLonBox.Rotation + (r1 + r2) / 2d;
|
||||
rotation = latLonBox.Rotation + (r1 + r2) / 2d % 360d;
|
||||
}
|
||||
|
||||
return (rect, rotation);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue