[Mapbender-commits] r8975 - trunk/mapbender/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 2 07:18:38 PDT 2014


Author: hwbllmnn
Date: 2014-07-02 07:18:38 -0700 (Wed, 02 Jul 2014)
New Revision: 8975

Modified:
   trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
Log:
fixed border case when selecting by box


Modified: trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
===================================================================
--- trunk/mapbender/lib/mb.ui.displayKmlFeatures.js	2014-07-02 14:00:00 UTC (rev 8974)
+++ trunk/mapbender/lib/mb.ui.displayKmlFeatures.js	2014-07-02 14:18:38 UTC (rev 8975)
@@ -255,12 +255,16 @@
                 matchedIds.push({url: itm.url, id: idx});
                 return;
             }
-            if(wgsbox.min.x > box[0] && wgsbox.max.x < box[2]) {
-                if(wgsbox.min.y > box[1] && wgsbox.max.y < box[3]) {
+            if(wgsbox.min.x < box[0] && wgsbox.max.x > box[2]) {
+                if(wgsbox.min.y > box[1] && wgsbox.min.y < box[3]
+                 || wgsbox.max.y > box[1] && wgsbox.max.y < box[3]) {
                     matchedIds.push({url: itm.url, id: idx});
                     return;
                 }
-                if(wgsbox.min.y < box[1] && wgsbox.max.y > box[3]) {
+            }
+            if(wgsbox.min.y < box[1] && wgsbox.max.y > box[3]) {
+                if(wgsbox.min.x > box[0] && wgsbox.min.x < box[2]
+                 || wgsbox.max.x > box[0] && wgsbox.max.x < box[2]) {
                     matchedIds.push({url: itm.url, id: idx});
                     return;
                 }



More information about the Mapbender_commits mailing list