mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
Updated BoundingBox
This commit is contained in:
parent
e8a34b1a9f
commit
8cdc03e411
6 changed files with 27 additions and 127 deletions
|
|
@ -18,16 +18,11 @@ namespace MapControl
|
|||
{
|
||||
public override Rect BoundingBoxToRect(BoundingBox boundingBox)
|
||||
{
|
||||
if (boundingBox is CenteredBoundingBox cbbox)
|
||||
{
|
||||
var center = LocationToMap(cbbox.Center);
|
||||
var center = LocationToMap(boundingBox.Center);
|
||||
|
||||
return new Rect(
|
||||
center.X - cbbox.Width / 2d, center.Y - cbbox.Height / 2d,
|
||||
cbbox.Width, cbbox.Height);
|
||||
}
|
||||
|
||||
return base.BoundingBoxToRect(boundingBox);
|
||||
return new Rect(
|
||||
center.X - boundingBox.Width / 2d, center.Y - boundingBox.Height / 2d,
|
||||
boundingBox.Width, boundingBox.Height);
|
||||
}
|
||||
|
||||
public override BoundingBox RectToBoundingBox(Rect rect)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue