[DE 2011, r56454] Does LocationRectangle.Collides working properly?

May 8, 2011 at 1:57 PM
Edited May 8, 2011 at 2:00 PM

Does LocationRectangle.Collides (Extent.Intersect) working properly? Map extent (LocationRectangle) Y coord (latitude) grow to north, but rect (rectangle) Y coord grow to south, so map item with extent.width=0 and extent.height=0 (symbol, marker) has not been included in any map extent. isn't right?

 

diff -r ceba415a0afa -r 92f7ac3e5e76 LocationRectangle.cs
--- a/LocationRectangle.cs	Sun May 08 17:40:47 2011 +0400
+++ b/LocationRectangle.cs	Sun May 08 17:41:32 2011 +0400
@@ -109,8 +109,8 @@
             var simpleOther = GetSimplifiedBounds(other);
             var simpleThis = GetSimplifiedBounds(this);
 
-            Rect a = new Rect(simpleThis.West, simpleThis.North, simpleThis.Width, simpleThis.Height);
-            Rect b = new Rect(simpleOther.West, simpleOther.North, simpleOther.Width, simpleOther.Height);
+            Rect a = new Rect(simpleThis.West, simpleThis.South, simpleThis.Width, simpleThis.Height);
+            Rect b = new Rect(simpleOther.West, simpleOther.South, simpleOther.Width, simpleOther.Height);
 
             a.Intersect(b);