mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Add BoundingBox.HasValidBounds
This commit is contained in:
parent
45cda387e4
commit
849a4e206c
3 changed files with 7 additions and 5 deletions
|
|
@ -74,8 +74,7 @@ namespace MapControl
|
|||
{
|
||||
MapRect mapRect = null;
|
||||
|
||||
if (!double.IsNaN(boundingBox.South) && !double.IsNaN(boundingBox.West) &&
|
||||
!double.IsNaN(boundingBox.North) && !double.IsNaN(boundingBox.East))
|
||||
if (boundingBox.HasValidBounds)
|
||||
{
|
||||
var p1 = LocationToMap(new Location(boundingBox.South, boundingBox.West));
|
||||
var p2 = LocationToMap(new Location(boundingBox.North, boundingBox.East));
|
||||
|
|
@ -87,6 +86,8 @@ namespace MapControl
|
|||
}
|
||||
else if (boundingBox.Center != null)
|
||||
{
|
||||
// boundingBox is a CenteredBoundingBox
|
||||
//
|
||||
var center = LocationToMap(boundingBox.Center);
|
||||
|
||||
if (center.HasValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue