[fusion-commits] r2153 - trunk/widgets/FeatureInfo

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri Apr 23 01:09:52 EDT 2010


Author: liuar
Date: 2010-04-23 01:09:48 -0400 (Fri, 23 Apr 2010)
New Revision: 2153

Modified:
   trunk/widgets/FeatureInfo/featureinfomain.php
Log:
Fixed ticket http://trac.osgeo.org/fusion/ticket/393
Exception in FDO component when using feature information (Digitize Polygon)

Modified: trunk/widgets/FeatureInfo/featureinfomain.php
===================================================================
--- trunk/widgets/FeatureInfo/featureinfomain.php	2010-04-23 05:08:55 UTC (rev 2152)
+++ trunk/widgets/FeatureInfo/featureinfomain.php	2010-04-23 05:09:48 UTC (rev 2153)
@@ -152,7 +152,15 @@
             for (var i = 0; i < polygon.Count; i++) {
                 points.push(polygon.Point(i).X+' '+polygon.Point(i).Y);
             }
+            
+            // Close the polygon if it isn't already closed
+            if(polygon.Point(0).X != polygon.Point(polygon.Count - 1).X ||
+               polygon.Point(0).Y != polygon.Point(polygon.Count - 1).Y) {
+                points.push(polygon.Point(0).X+' '+polygon.Point(0).Y);
+            }
+            
             var geomText = 'POLYGON(('+points.join(',')+'))';
+            
             SetSpatialFilter(geomText);
         }
 



More information about the fusion-commits mailing list